Click Function not working on any tests

Bug reports.
eldorado25
Posts: 21
Joined: Tue Aug 06, 2019 4:14 pm

Click Function not working on any tests

Post by eldorado25 » Fri Jun 12, 2020 11:43 am

Hi All,

I'm a bit concerned, I upgraded to 9.3 a few weeks ago did a couple of minor changes and ensured that everything was working by running some tests and such.

I went on holiday, came back, no one had touched the Ranorex scripts, but somehow the Click() function is not working for any tests.

Ranorex itself seems to think the click is carried out, however, it is evident that after the next step fails because the click is required that it has not been carried out.

Just wondering if anyone had any ideas as to how this could happen and why?

For the moment PerformClick() is working fine, i'm unable to diagnose as to what the issue is as Ranorex can see that the item is visible using EnsureVisible().

Thanks

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

Re: Click Function not working on any tests

Post by odklizec » Fri Jun 12, 2020 12:10 pm

Hi,

At first, make sure you are using most recent 9.3.2. There were many bug fixes introduced between 9.3.0 and 9.3.2.
At next, are we talking about web or desktop app? In case of web app, I would suggest to add WaitForDocumentLoaded action to the problematic recordings. Ideally, add it everywhere, where the page is loaded/refreshed. And finally, it's a good idea to add [@state='complete'] at the end of DOM repo element. Both WaitForDocumentLoaded and state=complete should ensure that the next operation is done only after the page is completely loaded. And your problem sounds exactly as if the click is performed before the page (UI) is completely loaded.
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

eldorado25
Posts: 21
Joined: Tue Aug 06, 2019 4:14 pm

Re: Click Function not working on any tests

Post by eldorado25 » Mon Jun 15, 2020 9:53 am

Hi thanks for your response,

I updated to 9.3.2 and am still getting the issue.

It is a Web Application, I've added a WaitForDocumentLoaded. It is also clear to see that the document has stopped loading when it attempts to click. The issue is that the mouse is maybe not moving to the element for some reason, which would indicate a tracking issue? but when i go onto the repository for these elements everything checks out.

I'm still trying to diagnose the issue

Thanks

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

Re: Click Function not working on any tests

Post by odklizec » Mon Jun 15, 2020 10:00 am

Hi,

Does this problem happens only on your desktop or any machine you eventually tried?

Also, try to split mouse Click action to a separate Move and Click actions. BTW, are you using Turbo mode? If not, try to enable it in problematic recordings. I'm using it in almost all my recordings, because it often helps with strange mouse-related issues, especially on VMs ;)
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

eldorado25
Posts: 21
Joined: Tue Aug 06, 2019 4:14 pm

Re: Click Function not working on any tests

Post by eldorado25 » Mon Jun 15, 2020 10:29 am

Interesting it only happens on the VM I mainly use.

The other VM I have with Ranorex (9.3.1) installed seems to work fine, but I don't understand because there are no differences between them?

I will see if Turbo Mode makes a difference on my main machine.

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

Re: Click Function not working on any tests

Post by odklizec » Mon Jun 15, 2020 10:34 am

Hi,

Well, in case of VMs, you may never know ;) I guess they are not exactly the same if one of them acts weirdly. Check if they both are updated with the same windows updates, if Ranorex system requirements are installed (and the same) on both VMs and so on.
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

eldorado25
Posts: 21
Joined: Tue Aug 06, 2019 4:14 pm

Re: Click Function not working on any tests

Post by eldorado25 » Mon Jun 15, 2020 11:29 am

Hmm,

I've had a further look at my main Vm, and it appears to work fine if i create a new project on it. So I can only assume at this point there is a setting not allowing for it to move the mouse?

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

Re: Click Function not working on any tests

Post by odklizec » Mon Jun 15, 2020 12:14 pm

Hi,

I'm not aware of such mouse-related setting? But I would definitely compare settings from old project and from newly created project.

BTW, in the original project, do you have settings stored in the solution?
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

eldorado25
Posts: 21
Joined: Tue Aug 06, 2019 4:14 pm

Re: Click Function not working on any tests

Post by eldorado25 » Mon Jun 15, 2020 1:05 pm

Hi,

I have fixed it for the time being by setting in Plugins under Mouse 'Disable user input during automation actions' to False

I thought it could be due to having both a trackpad and a mouse (using a laptop as working from home at the moment) enabled which could possibly confuse Ranorex, but this is not the case after testing.

Thanks