jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

Identifiers only work with Hashes #8

Closed myungs closed 12 years ago

myungs commented 13 years ago

RAutomation currently only seems to work with =>

@window.button(:value => "OK)

Will work, but the following will not:

@window.button(:value, "OK")

and give the error: ArgumentError: wrong number of arguments (2 for 1)

jarmo commented 13 years ago

This has been intentional due to the possibility of using multiple identifiers, e.g.: window.button(:index => 2, :value => "Save")

What's the use case and/or why you'd like to use 2 arguments instead of hash?

myungs commented 13 years ago

I think there might be a bit of confusion, I was just using one identifier with an input of (:key, value) rather than (:key => value). It's just that watir worked that way and I was expecting the same behavior.

jarmo commented 12 years ago

Watir works that way because it was some old design decision. It's rather deprecated feature of Watir, but you may still use it if you want. I, myself, don't use it at all though.