Checkbox not found, keyboard deactivates during test on VM

Ask general questions here.
TomBrad
Posts: 19
Joined: Mon Mar 30, 2020 12:00 pm

Checkbox not found, keyboard deactivates during test on VM

Post by TomBrad » Wed Oct 13, 2021 4:13 pm

Hello,

I’m running a test on an application on my virtual machine. During the test, two wizards are stepped through. Each wizard has a set of windows that are progressed through by clicking on a ‘Next’ button. The first window in each wizard has a radio button, and then the next window has a checkbox which is in a ticked state and must be unticked.

When I run my Ranorex test, the first wizard is successfully progressed through and closed. When the second wizard is progressed through, Ranorex fails to click the checked checkbox. It seems to miss it. When I tried to use Key Sequences of tab presses to get to the checkbox, and then untick it using the Space bar as a key sequence, this doesn’t work, even though it does when I do it manually.

When the test then fails and I have to close down Ranorex and the application, the keyboard input to the virtual machine stops working. If I try to type characters into Notepad, nothing shows up. I have to reboot the virtual machine to get the character input from keyboard working again.

Has anyone encountered these issues and knows a way past them?

Thanks,
Thomas

User avatar
tmcdoniel
Certified Professional
Certified Professional
Posts: 78
Joined: Mon Dec 07, 2020 6:30 pm

Re: Checkbox not found, keyboard deactivates during test on VM

Post by tmcdoniel » Wed Oct 13, 2021 9:15 pm

Have you tried using the invoke smart action? I'm not sure why the failure would cause the loss of keyboard control. If a more limited test is successful do you lose keyboard control?

Image
Sales Engineer @ Ranorex

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

Re: Checkbox not found, keyboard deactivates during test on VM

Post by odklizec » Thu Oct 14, 2021 7:11 am

Hi,

As for disabled keyboard, please go to Program.cs and comment out this line:

Code: Select all

Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
This line could cause the issue you described, especially in case of forcibly terminated test.
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

TomBrad
Posts: 19
Joined: Mon Mar 30, 2020 12:00 pm

Re: Checkbox not found, keyboard deactivates during test on VM

Post by TomBrad » Thu Oct 14, 2021 11:47 am

Thank you both for your advice. The Invoke Action does not seem to find the checkbox. Also, when I commented out the line in Program.cs and ran the test, the keyboard was still disabled afterwards. Mouse clicks work, but in Notepad I typed in letters but they did not appear on the screen. If I typed the letter 'm' a few times, the effect was as though I'd hit the return button.

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

Re: Checkbox not found, keyboard deactivates during test on VM

Post by Fergal » Thu Oct 14, 2021 1:32 pm

Ranorex fails to click the checked checkbox. It seems to miss it.
Is Ranorex able to identify the checked checkbox at that point in the test? Do you know if the issue is caused because Ranorex is not recognizing the element or is it caused because the action you have to uncheck the checkbox is failing?

Perhaps the element is in a different state at that point in the test and you need to update its xpath or add another repo element for it.

User avatar
tmcdoniel
Certified Professional
Certified Professional
Posts: 78
Joined: Mon Dec 07, 2020 6:30 pm

Re: Checkbox not found, keyboard deactivates during test on VM

Post by tmcdoniel » Fri Oct 15, 2021 5:28 pm

When using the invoke action for checkboxes do make sure that you upgrade to the latest version as there was a bug fix for it in 10.1.2 .

Image
Sales Engineer @ Ranorex