Interaction with a setup window

Ranorex Studio, Spy, Recorder, and Driver.
Anton_R
Posts: 4
Joined: Mon Jul 15, 2019 5:10 pm

Interaction with a setup window

Post by Anton_R » Mon Jul 15, 2019 5:38 pm

I use Ranorex 9.1.0 to automate our desktop testing. During the tests I reinstall our software. The issue is Ranorex, called remotely, doesn't interact with setup window. It clicks all needed buttons in "Programs and Features", clicks everything on our app, it even validates the setup window is open and the "Uninstall" button exists, logs that the button has been clicked and wits for next element that appears after the "Uninstall" button is pressed.

I face the issue only while using Ranorex add-on license. There are no problems, if I run the same solution from Ranorex Studio on the same machine.

Thank you,
Anton

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

Re: Interaction with a setup window

Post by odklizec » Tue Jul 16, 2019 7:53 am

Hi,

Have you tried to split the mouse Click action, into separate mouse Move and mouse Click actions? This often helps with similar VM-related problems. Also, try to enable Turbo mode for given recording. It also helps with mouse-related problems, because it basically eliminates mouse move action and mouse simply jumps to desired element and clicks it.
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

Anton_R
Posts: 4
Joined: Mon Jul 15, 2019 5:10 pm

Re: Interaction with a setup window

Post by Anton_R » Tue Jul 16, 2019 9:21 am

Hello odklizec!
Thank you for response.

I'm sure it doesn't matter, but I use code modules instead of recordings. I usually record my actions and then copy the code from recording into my own code module and transform it to whatever I need.

Back to your suggestion: yes, I tried to separate mouse actions.

Also, I tried to use image driven interaction, but the result is the same - Ranorex, being in Add-on mode, ignores the uninstall form.

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

Re: Interaction with a setup window

Post by odklizec » Tue Jul 16, 2019 9:33 am

Hi,

I'm not sure what you mean by Ranorex add-on mode? Do you mean runtime license? Also, how do you run your test on VM? Are you using some kind of continuous integration or you simply copy all test files manually and start it from command line? And finally, are you sure the Ranorex settings are the same on both desktop and VM?

It should not matter if you use code module. To make the code module to run in "Turbo" mode (like Recording), add or change these lines...
Mouse.DefaultMoveTime = 0;
Keyboard.DefaultKeyPressTime = 20;
Delay.SpeedFactor = 0.00;
Another thing you might try is to toggle Use asynchronous dispatching mouse and keyboard events option in Ranorex settings >> Advanced tab.
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

Anton_R
Posts: 4
Joined: Mon Jul 15, 2019 5:10 pm

Re: Interaction with a setup window

Post by Anton_R » Wed Jul 17, 2019 6:31 pm

Hello odklizec.

Yes, you are right, I mean runtime license by talking 'add-on mode'.

I added the code you posted but issue is still here.

For running our tests we use Ranorex and TeamCity integration, setup according to Ranorex's guideline. In order to launch our TeamCity agent with administrator rights, I put a batch script into the 'Startups' directory.

For the code deliverance I use git.

Yes, Ranorex's settings, so they were exported/imported.
The 'Use asynchronous dispatching mouse and keyboard events' option is enabled.

The thing is when I remove license configuration, launch Ranorex Studio, and run test suite everything works fine. Ranorex opens 'Programs and Features', finds needed row, clicks on it, clicks the 'Uninstall' button, and goes further through the uninstall window without any problems.
But if I launch the same testsuite under TeamCity Ranorex doesn't interact with the uninstall window, it validates that the window exists, fails the validation that the window does not exist (I added this validation in order to check if the validation works correctly with this window), writes to log that found the 'Uninstall' button, writes that pushed it, but in reality it makes nothing with the uninstall window, even doesn't move mouse pointer.

I tried to use images, but I don't have a positive result yet :)

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

Re: Interaction with a setup window

Post by odklizec » Thu Jul 18, 2019 2:33 pm

Hi,

This is really weird. But I think it has something to do with VM-based interaction. Have you tried the "Turbo" mode I mentioned before? Also, I would try to UNCHECK "Use asynchronous dispatching mouse and keyboard events". In a theory, this option should actually help with similar VM-related mouse &keyboard issues, but in some cases, it does exact opposite (don't ask me why;)).
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

Anton_R
Posts: 4
Joined: Mon Jul 15, 2019 5:10 pm

Re: Interaction with a setup window

Post by Anton_R » Fri Jul 19, 2019 9:47 am

Hello!

Finally, I have it fixed!

I created a task in "Task Scheduler" which is run with the highest privileges and has a goal to launch TeamCity agent.