No Exception if element was not clicked

Class library usage, coding and language questions.
deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

No Exception if element was not clicked

Post by deepak1920 » Thu Mar 16, 2017 1:45 pm

Hi,

I want to click on a button. I can do it by using button.Click() method.

Let's say button is overlapped by another pop-up window. We can interact with this button only after popup window is closed. For some reason popup window was not closed by script. Then the script tries to click the button. Button.Click() method tries to click the button but click takes place on popup window area overlapping the button. Hence click happened for ranorex script but in actual it didn't happen. No exception or error could be recorded for the same.

Do we have any way which can tell whether the button was actually clicked or not?


Regards,
Deepak

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3922
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: No Exception if element was not clicked

Post by odklizec » Thu Mar 16, 2017 2:08 pm

Hi,

The only way how to tell an element was clicked is validating the outcome/element following the click. I don't think there is another way.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: No Exception if element was not clicked

Post by qwertzu » Thu Mar 16, 2017 2:18 pm

Hi,

I just wanted to write the same as odklizec.
Try to validate whatever happens after clicking the button.
So, if there i.e. something shows up after clicking the button, you could validate if it really appeared with a simple validation action.

regards,
qwertzu