Spy finding wrong button
Posted: Mon Oct 13, 2014 5:34 pm
How can I force Ranorex to find an exact button? I have several Flex buttons in a navigation pane across the top of the page. When a particular button exists, it finds it just fine using highlight element.
When a button does not exists, the highlight element finds a different button in the pane which is incorrect. I can't figure out how to get Ranorex to fail to find a button when it doesn't exists.
This is the path to the button I'm working with:
/dom[@domain='zzz.com']/body/div/flexobject/container/toolbar[@id='headerBar']/
container/container[@id='navigator_M']/container[@id='hbNavButtonBar']/
container[@id='hbNavButtons']/container[@id='vbBtnElectricalSim']/button[@id='btnElectrical'']
When the button does not exist, it highlights this button instead:
/dom[@domain='zzz.com']/body/div/flexobject/container/toolbar[@id='headerBar']/
container/container[@id='navigator_M']/container[@id='hbNavButtonBar']/
container[@id='hbNavButtons']/container[@id='vbBtnThermalSim']/button[@id='btnThermal']
When a button does not exists, the highlight element finds a different button in the pane which is incorrect. I can't figure out how to get Ranorex to fail to find a button when it doesn't exists.
This is the path to the button I'm working with:
/dom[@domain='zzz.com']/body/div/flexobject/container/toolbar[@id='headerBar']/
container/container[@id='navigator_M']/container[@id='hbNavButtonBar']/
container[@id='hbNavButtons']/container[@id='vbBtnElectricalSim']/button[@id='btnElectrical'']
When the button does not exist, it highlights this button instead:
/dom[@domain='zzz.com']/body/div/flexobject/container/toolbar[@id='headerBar']/
container/container[@id='navigator_M']/container[@id='hbNavButtonBar']/
container[@id='hbNavButtons']/container[@id='vbBtnThermalSim']/button[@id='btnThermal']