I have an application which has a settings page. When i try to click any one item on the page via ranorex spy or the studio spy tool, every single element on the page gets clicked, and then a few behind it on a different tab (its a tab page). I m not sure what's going on here, but would love to hear a solution. All the individual buttons get recognized by spy, but clicking any of them clicks every item on the page.

I have attached a snapshot and would appreciate any resolutions to the matter.

My guess would be that your developers decided to use one OnClick handler method to handle ALL clicks on the page, instead of doing an OnClick handler for each clickable element. When Ranorex does the Click action from Spy, it is probably triggering the OnClick event, but the handler isn't called correctly because Ranorex doesn't know about your page's mechanisms.

There is definitely something weird about the AUT or the way Ranorex recognizes its elements. It's very well visible in the attached snapshot. Many elements have incorrect screenshots as if covered by something else. Eventually, the element rectangles are taken with offset. At first, I would suggest to examine display scaling. Just make sure it's set to 100% (max 125%).

I work beside Devinder and watched the strange behavior. jma, when Ranorex clicks on one element, all the check boxes get checked simultaneously. A popup also appears. The popup is actually activated from a different tab from the element. I think your guess is a good one krstcs. Devinder is back at work tomorrow and will follow up with more information. This is an older application and the first time automation has been attempted on this screen so I suppose strange behavior is expected.

Solved. The behavior was being caused by the use of the optional (?) path element. ?/?/button[@text='Left Face'] triggered the strange behavior. Using .//button[@text='Left Face'] instead fixed the problem. Somehow Ranorex must have triggered the event or events when it was querying the optional path.

Thank you all for the replies. I apologize for not responding right away, was out of work.

I think David was able to solve the issue yesterday, and listed it above.

Thank you all.

side note responses:

jma: it was clicking all items on the tab page, i guess its solved for now but i can show if you want.
krstcs: this was not the issue, but i think its a feasible idea and a good one to keep in the back of my mind.
oklizec: its curious, because even now when we select the item at all in the spy tool, everything automatically gets clicked. Ranorex seems to be doing some verification or traversal behind the scenes, i would love to read up on some literature describing how it works. The scaling however, was not the issue, the pathing was, somehow