I have the following problem:
In the SUT to test there is a menu item to start the windows task manager. To test this functionality I have recorded a tests which is using the menu item, validates the existence of the the task manager and closes the task manager. This tests works if started from Ranorex studio. But if I execute the same test from the command line, the task manager is not found during the validation step and the GUI elements of the task manager are not found.
Any idea why the tests fails if started from the command line but works if started from Ranorex studio (Version 8.3.0)?
Kind regards,
Hans-Georg
GUI element not found when test stated from command line
Re: GUI element not found when test stated from command line
Hi,
Could you please post the exact error you are getting? Also, what is the xpath behind the recorded repo item?
My guess is it's either a permission issue or the xpath is simply different? Unfortunately, it's hard to tell what's wrong, without seeing the xpath and snapshot (NOT screenshot) of the problematic element. Plus it would be very helpful to see the exact steps you are trying to perform (screenshot of recording should be fine).
BTW, are you running the test from a local drive? Ranorex does not support running tests from network/shared drives!
Could you please post the exact error you are getting? Also, what is the xpath behind the recorded repo item?
My guess is it's either a permission issue or the xpath is simply different? Unfortunately, it's hard to tell what's wrong, without seeing the xpath and snapshot (NOT screenshot) of the problematic element. Plus it would be very helpful to see the exact steps you are trying to perform (screenshot of recording should be fine).
BTW, are you running the test from a local drive? Ranorex does not support running tests from network/shared drives!
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: GUI element not found when test stated from command line
Thank you for your quick response!
I'm running the test from a local drive.
My test is using a menu to start the Task Manager
followed by a validation to check that the Task Manager has started.
Afterwards the Task Manaher is closed by clicking on the (X).
It woks perfectly when executing the test from the Ranore studio, but when executing the tests by starting the test from the command line the validation fails. This message is diaplyed:
Attribute 'Title' of element for item 'CHIRplus_FX_Sanity_ChecksRepository.TaskManager.Self' does not match the specified value (Failed to find item 'CHIRplus_FX_Sanity_ChecksRepository.TaskManager.Self'. No element found for path '/form[@name='Task Manager' or @title='Windows Task-Manager']' within 30s.).
I have attached the snapshot of the Task Managers (X). I guess it has to do something with the permissions (adminsitartive rights?).
I'm also trying to attach screenshots of the steps desribed eralier but for some reasons the screenshots disappear after I use "Preview".
I'm running the test from a local drive.
My test is using a menu to start the Task Manager
followed by a validation to check that the Task Manager has started.
Afterwards the Task Manaher is closed by clicking on the (X).
It woks perfectly when executing the test from the Ranore studio, but when executing the tests by starting the test from the command line the validation fails. This message is diaplyed:
Attribute 'Title' of element for item 'CHIRplus_FX_Sanity_ChecksRepository.TaskManager.Self' does not match the specified value (Failed to find item 'CHIRplus_FX_Sanity_ChecksRepository.TaskManager.Self'. No element found for path '/form[@name='Task Manager' or @title='Windows Task-Manager']' within 30s.).
I have attached the snapshot of the Task Managers (X). I guess it has to do something with the permissions (adminsitartive rights?).
I'm also trying to attach screenshots of the steps desribed eralier but for some reasons the screenshots disappear after I use "Preview".
You do not have the required permissions to view the files attached to this post.
Re: GUI element not found when test stated from command line
As I suspected, it appears to be a permission issue. The snapshot you provided immediately complaints about permissions.
https://www.ranorex.com/help/latest/int ... plications
Are you starting the test as Administrator? Just create a shortcut (for batch file) and set it to run as Administrator.
Please follow the steps mentioned in User Guide:https://www.ranorex.com/help/latest/int ... plications
Are you starting the test as Administrator? Just create a shortcut (for batch file) and set it to run as Administrator.
You do not have the required permissions to view the files attached to this post.
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: GUI element not found when test stated from command line
Thank you for your answer! It helped me a lot to solve the issue.
Re: GUI element not found when test stated from command line
Hi,
You are welcome. I'm glad I could help
You are welcome. I'm glad I could help
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