Closed leviwilson closed 6 years ago
The problem goes a bit deeper than this. Removing the DEFAULT_LOCATORS
will work for an individual Window#button
call, but for Window#buttons
this breaks down, since that will depend on Win32 to locate the Windows that have the class name with /button/i
. There is an inconsistency. This will affect both Window#buttons
and Window#text_fields
.
@jarmo - would you like me to create a separate issue for the #buttons
/ #text_fields
issues? I can fix this issue, but it breaks buttons_spec.rb (only for :ms_uia
though)
Hmm, i would be in favor of removing DEFAULT_LOCATORS
altogether from ms_uia
if there's a better way to determine if something is a button or not. In win_32
solution like this seemed to be the only viable way.
#buttons
might retrieve all the buttons which are buttons - maybe some similar solution could be used as for SelectList#options
- retrieve all elements and then filter by type at Ruby side. Or retrieve only elements with correct type in the first place.
The better way is to use the control type property, which it already does. The caveat with this is that there's nothing (currently) in there to do this. I have ideas for this though, and it would fulfill #73 and #74.
@leviwilson any progress with this?
Closing this due to inactivity.
Description
With the
:ms_uia
adapter, if you have anAutomationElement
with the control type ofButton
, but the class name does not have'button'
in it, you cannot interact with it.Proposed Solution
Remove the
DEFAULT_LOCATORS
definition since it is already checking the control type property to determine that it is a button.