PerformClick() fails to do that.

Ranorex Spy, Recorder, and Studio.
dmconsulting1
Posts: 102
Joined: Fri Nov 08, 2019 3:23 pm

PerformClick() fails to do that.

Post by dmconsulting1 » Mon Feb 08, 2021 6:15 pm

So for some reason, a normal click event isn't working. The object is there, Ranorex SAYS it clicked, but it didn't. I added a delay after the wait for attribute, I added a second click "just in case", neither has worked. So I decided to try PerformClick and it blows up.

What am I doing wrong?
Attachments
invokeAction.png
invokeAction.png (29.32 KiB) Viewed 87 times
performClick.png
performClick.png (42.02 KiB) Viewed 87 times

Fergal
Certified Professional
Certified Professional
Posts: 344
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: PerformClick() fails to do that.

Post by Fergal » Fri Feb 12, 2021 5:58 pm

I'd suggest taking a look at the repository element in Spy, when you have the application open where you want to click. See what your repository element is mapping to in your app and confirm that it is something that is clickable.

From your report it looks like Ranorex might be trying to click on an element, e.g. text, that is not clickable.

dmconsulting1
Posts: 102
Joined: Fri Nov 08, 2019 3:23 pm

Re: PerformClick() fails to do that.

Post by dmconsulting1 » Fri Feb 12, 2021 7:17 pm

I adjusted the repo item, put it back to a mouse click and it still doesn't click.

Here is the repo item and here it is highlighted by Spy. And yet no click.
continueButtonRepo.png
continueButtonRepo.png (37.7 KiB) Viewed 59 times
menuBarContinueButton.png
menuBarContinueButton.png (19.25 KiB) Viewed 59 times
I can't do the PerformClick() because the "Instance does not have the requested Method. performclick" so a mouse click action it is.

Fergal
Certified Professional
Certified Professional
Posts: 344
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: PerformClick() fails to do that.

Post by Fergal » Fri Feb 12, 2021 8:08 pm

Try taking the two optional items from the end of the XPAth and see if it works then. i.e. remove the "/?/?" so that your XPath ends with [4]

dmconsulting1
Posts: 102
Joined: Fri Nov 08, 2019 3:23 pm

Re: PerformClick() fails to do that.

Post by dmconsulting1 » Fri Feb 12, 2021 9:47 pm

So Ranorex THINKS it clicked when it clearly didn't.
failedClickContinue.png
failedClickContinue.png (83.55 KiB) Viewed 53 times
The OK button never displays because the process failed to continue. It thinks it has clicked, but the UI doesn't feel the same way.

dmconsulting1
Posts: 102
Joined: Fri Nov 08, 2019 3:23 pm

Re: PerformClick() fails to do that.

Post by dmconsulting1 » Fri Feb 12, 2021 9:54 pm

And it's not like it can't click the button other times. It's just this one instance.
passedClickContinue.png
passedClickContinue.png (43.76 KiB) Viewed 53 times