Hi All,
I am quite new in a Ranorex Studio so please be gentle
We were running our nightly tests on a remote server that is actually a laptop with Windows10.
Run and deployment is provided by Azure DevOps agent.
Everything was fine more/less 2 months ago and it started to fail somehow.
Recently I started to fix the issues one by one and locally all works fine.
However when I try to run on remote, all the time I got the message at the beggining:
Failed to find item 'xxx'. Please check that your whitelist allows Ranorex to access the process.
No element found for path '/form/button[@accessiblename='yyy']' at step 'form[zzz']' after 1339 attempts within 1.5m.
The button that is accessible from the development machine is not accessible on the remote.
The machine was prepared to be remotely executed and worked before. Screen saver is disabled, rdp session is ended with: %windir%\System32\tscon.exe 1 /dest:console.
When I am connected with rdp and then execute Azure deployment all is fine, but when I'm disconnected application opens and I get an error like above.
Can you advise somehow?
Thanks,
mutleyy
Object identification on remote machine
Re: Object identification on remote machine
Hi,
Have you actually tried to logon to the remote machine and try your test with Ranorex Studio? This is the best and fastest way to discover what's wrong. My best guess is, that there is simply something different on the laptop. Could you please show us entire xpath, as stored in repository and ideally, also Ranorex snapshot (NOT screenshot), taken on the target machine? Thanks.
Have you actually tried to logon to the remote machine and try your test with Ranorex Studio? This is the best and fastest way to discover what's wrong. My best guess is, that there is simply something different on the laptop. Could you please show us entire xpath, as stored in repository and ideally, also Ranorex snapshot (NOT screenshot), taken on the target machine? Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Object identification on remote machine
Hi,
Thanks for your reply.
There is the full error code:
Failed to find item 'MedicationRepository.RiVer.Toolbar.BtnRefresh'. Please check that your whitelist allows Ranorex to access the process.
No element found for path '/form[@title~'Patient Medikation richten und verabreichen']/container[@accessiblename='Arbeitsbereich']/form[@accessiblename='Patient Medikation richten und verabreichen']/element/element/element/element[@accessiblename='xtpBarTop']/element/toolbar[@childindex='1']/button[@accessiblename='Ansicht aktualisieren']' at step 'form[@title~'Patient Medikation richten und verabreichen']' after 1339 attempts within 1.5m.
We don't have Ranorex Studio installed on this machine. The runtime files only..
Thanks for your reply.
There is the full error code:
Failed to find item 'MedicationRepository.RiVer.Toolbar.BtnRefresh'. Please check that your whitelist allows Ranorex to access the process.
No element found for path '/form[@title~'Patient Medikation richten und verabreichen']/container[@accessiblename='Arbeitsbereich']/form[@accessiblename='Patient Medikation richten und verabreichen']/element/element/element/element[@accessiblename='xtpBarTop']/element/toolbar[@childindex='1']/button[@accessiblename='Ansicht aktualisieren']' at step 'form[@title~'Patient Medikation richten und verabreichen']' after 1339 attempts within 1.5m.
We don't have Ranorex Studio installed on this machine. The runtime files only..
Re: Object identification on remote machine
Well, I'm afraid, that in order to debug the problem, you will have to install Studio also on remote machine. If you use floating license, there should not be a problem with that? Simply install Studio, debug the xpath and leave it there or uninstall it. As long as the Studio is not started, license is not consumed.
Another possibility how to debug the problem without installing Studio on the target machine, is to add Create Snapshot action before the failing command and point it to the main application Form of the app under test. Then open the snapshot (available in Report) and try to debug the xpath.
My guess is, that certain element is not there or is different. Honestly such xpath is rather easy to break. Try to use something like this instead:
Code: Select all
/form[@title~'Patient Medikation']/container[@accessiblename='Arbeitsbereich']/form[@accessiblename='Patient Medikation ']//element[@accessiblename='xtpBarTop']//button[@accessiblename='Ansicht aktualisieren']
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Object identification on remote machine
Ok,
I will try to install Studio and debug it.
I've noticed now that it cannot access one element before.
'Ansicht aktualisieren' element is located inside the plugin that supposed to be opened in previous step.
There is a log file:
[2021/10/21 15:12:42.318][Info ][Application]: Run application with file name from variable $AUT_PATH with arguments from variable $AUT_ARGUMENTS in normal mode. Return value bound to $StartAutProcessIDVar.
[2021/10/21 15:12:43.018][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnMedicationPrescription' at Center.
[2021/10/21 15:12:50.186][Success][Test]: Test Module 'StartAUT' completed with status 'Success'.
[2021/10/21 15:12:50.187][Info ][Test]: Test Module 'OpenRiVerModuleInitial' started.
[2021/10/21 15:12:50.238][Info ][User]: Popup watcher started.
[2021/10/21 15:12:50.282][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnRiVer' at Center.
[2021/10/21 15:12:57.879][Info ][User]: Popup watcher stopped.
[2021/10/21 15:12:57.930][Info ][Mouse]: Mouse Left Click item 'RiVer.Toolbar.BtnRefresh' at Center.
[2021/10/21 15:14:28.068][Error ][Module]: Failed to find item 'MedicationRepository.RiVer.Toolbar.BtnRefresh'. Please check that your whitelist allows Ranorex to access the process.<br/>No element found for path '/form[@title~'Patient Medikation richten und verabreichen']/container[@accessiblename='Arbeitsbereich']/form[@accessiblename='Patient Medikation richten und verabreichen']/element/element/element/element[@accessiblename='xtpBarTop']/element/toolbar[@childindex='1']/button[@accessiblename='Ansicht aktualisieren']' at step 'form[@title~'Patient Medikation richten und verabreichen']' after 1235 attempts within 1.5m.
When I go during test execution to the machine I see that no plugin is opened. (Screenshots on the Report confirm that)
It should be done by:
[2021/10/21 15:12:43.018][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnMedicationPrescription' at Center.
and later the second plugin by:
[2021/10/21 15:12:50.282][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnRiVer' at Center.
Error says about the control that is inside Patient Medikation richten und verabreichen which is opened by Mouse Left Click item 'KgEditor.BtnRiVer' at Center.
So the action before is not executed properly and we don't see any error about that..
I will try to install Studio and debug it.
I've noticed now that it cannot access one element before.
'Ansicht aktualisieren' element is located inside the plugin that supposed to be opened in previous step.
There is a log file:
[2021/10/21 15:12:42.318][Info ][Application]: Run application with file name from variable $AUT_PATH with arguments from variable $AUT_ARGUMENTS in normal mode. Return value bound to $StartAutProcessIDVar.
[2021/10/21 15:12:43.018][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnMedicationPrescription' at Center.
[2021/10/21 15:12:50.186][Success][Test]: Test Module 'StartAUT' completed with status 'Success'.
[2021/10/21 15:12:50.187][Info ][Test]: Test Module 'OpenRiVerModuleInitial' started.
[2021/10/21 15:12:50.238][Info ][User]: Popup watcher started.
[2021/10/21 15:12:50.282][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnRiVer' at Center.
[2021/10/21 15:12:57.879][Info ][User]: Popup watcher stopped.
[2021/10/21 15:12:57.930][Info ][Mouse]: Mouse Left Click item 'RiVer.Toolbar.BtnRefresh' at Center.
[2021/10/21 15:14:28.068][Error ][Module]: Failed to find item 'MedicationRepository.RiVer.Toolbar.BtnRefresh'. Please check that your whitelist allows Ranorex to access the process.<br/>No element found for path '/form[@title~'Patient Medikation richten und verabreichen']/container[@accessiblename='Arbeitsbereich']/form[@accessiblename='Patient Medikation richten und verabreichen']/element/element/element/element[@accessiblename='xtpBarTop']/element/toolbar[@childindex='1']/button[@accessiblename='Ansicht aktualisieren']' at step 'form[@title~'Patient Medikation richten und verabreichen']' after 1235 attempts within 1.5m.
When I go during test execution to the machine I see that no plugin is opened. (Screenshots on the Report confirm that)
It should be done by:
[2021/10/21 15:12:43.018][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnMedicationPrescription' at Center.
and later the second plugin by:
[2021/10/21 15:12:50.282][Info ][Mouse]: Mouse Left Click item 'KgEditor.BtnRiVer' at Center.
Error says about the control that is inside Patient Medikation richten und verabreichen which is opened by Mouse Left Click item 'KgEditor.BtnRiVer' at Center.
So the action before is not executed properly and we don't see any error about that..
Re: Object identification on remote machine
Hi,
Try to split the Mouse Click command to Mouse Move and Mouse Click actions. Eventually, enable Turbo mode in affected recordings. In some cases, usually on VMs, mouse actions can fail because of slow mouse move action. Therefore, it's better to split mouse click into separate move and click actions. Turbo mode, on the other hand, skips all delays and mouse is not moved, but rather "jumps" from position A directly to B. Hope this helps?
Try to split the Mouse Click command to Mouse Move and Mouse Click actions. Eventually, enable Turbo mode in affected recordings. In some cases, usually on VMs, mouse actions can fail because of slow mouse move action. Therefore, it's better to split mouse click into separate move and click actions. Turbo mode, on the other hand, skips all delays and mouse is not moved, but rather "jumps" from position A directly to B. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Object identification on remote machine
Hi,
I checked both and didn't help..
I checked both and didn't help..
Re: Object identification on remote machine
Hi,
Could it be that the clicks are performed too soon? Have you tried to add a small delay before clicking BtnMedicationPrescription and BtnRiVer?
I mean, in some cases, when the app interface is already up, but not entirely ready yet, Ranorex may already find the element, which is supposed to be clicked, but because the element is not ready, the click is performed but does not trigger underlying events. Just try to add a small delay before clicking both buttons.
Also, make sure the xpath for both problematic buttons is unique so Ranorex does not click on an "hidden" element with the same xpath Ideally, add @visible='true' and @enabled='true' to the xpath of both buttons.
Could it be that the clicks are performed too soon? Have you tried to add a small delay before clicking BtnMedicationPrescription and BtnRiVer?
I mean, in some cases, when the app interface is already up, but not entirely ready yet, Ranorex may already find the element, which is supposed to be clicked, but because the element is not ready, the click is performed but does not trigger underlying events. Just try to add a small delay before clicking both buttons.
Also, make sure the xpath for both problematic buttons is unique so Ranorex does not click on an "hidden" element with the same xpath Ideally, add @visible='true' and @enabled='true' to the xpath of both buttons.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Object identification on remote machine
I will check that.
What is wondering me, why it would be rendered fine when I'm rdp connected?
I'm still thinking that somehow disconnecting from rdp, even with tscon blocks UI somehow and causes that these elements are not accessible.
How to explain otherwise that all is fine when I execute it locally and when I got rdp connection to this machine?
What is wondering me, why it would be rendered fine when I'm rdp connected?
I'm still thinking that somehow disconnecting from rdp, even with tscon blocks UI somehow and causes that these elements are not accessible.
How to explain otherwise that all is fine when I execute it locally and when I got rdp connection to this machine?
Re: Object identification on remote machine
I added 10s delay after application opens and even the first button was not clicked (another plugin should be opened).
Re: Object identification on remote machine
Hi,
Ah sorry, I missed the RDP part in your original post. Well, if the problem happens only after disconnecting from RDP, then yes, it's most probably caused by this. I'm afraid, I'm not using the tscon script, but rather a Logon Expert utility, which keeps the VM logged in, even after disconnecting/minimizing the RDP window. So I don't have any other suggestion than to ditch the tscon workaround and try the LogoExpert as well?
Ah sorry, I missed the RDP part in your original post. Well, if the problem happens only after disconnecting from RDP, then yes, it's most probably caused by this. I'm afraid, I'm not using the tscon script, but rather a Logon Expert utility, which keeps the VM logged in, even after disconnecting/minimizing the RDP window. So I don't have any other suggestion than to ditch the tscon workaround and try the LogoExpert as well?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Object identification on remote machine
Sure, will check