How to configured and use WebDriver in the Ranorex?
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
How to configured and use WebDriver in the Ranorex?
Hi,
How to can I configure and use Ranorex for the tests using WebDriver?
Thanks.
How to can I configure and use Ranorex for the tests using WebDriver?
Thanks.
Re: How to configured and use WebDriver in the Ranorex?
Hi,
Webdriver integration is described in Ranorex user guide, available here:
https://www.ranorex.com/help/latest/int ... tegration/
Webdriver integration is described in Ranorex user guide, available here:
https://www.ranorex.com/help/latest/int ... tegration/
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
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
Thank you.
I followed the Ranorex guide and completed all steps.
Now I created a new project and try to test with Selenium but can't.
1) I saved and then launched a simple script that types text to the input field (I used the Ranorex Forum for testing).
2) This script works well with Ranorex.
3) When I tried to execute this script with Selenium WebDriver I got the error "Failed to found the item".
- So item can be found with Ranorex, but can't be found with Selenium
4) I inspected the repository and determined strange behavior: the path to the input field isn't appropriate to the existing path.
That the full path to the input field:
/form[@title~'^Test\ Automation\ for\ GUI\ T']/container[@accessiblerole='Grouping']/container[1]/element[@accessiblerole='None']/container[@accessiblename~'^Test\ Automation\ for\ GUI\ T']/element[1]/element/element[@accessiblerole='None']/element[1]/element[@accessiblerole='None']/element[@accessiblerole='None']/element[@accessiblerole='None']/element[2]/?/?/text[@accessiblename='Search Ranorex ...']
As we can see - the path ends with the tag: //text,
but the true path equals to '//div[@class='input-group']/input' and should be ends with '//input'. In addition, Ranorex Selocity totally does not found the '//text' path!
I followed the Ranorex guide and completed all steps.
Now I created a new project and try to test with Selenium but can't.
1) I saved and then launched a simple script that types text to the input field (I used the Ranorex Forum for testing).
2) This script works well with Ranorex.
3) When I tried to execute this script with Selenium WebDriver I got the error "Failed to found the item".
- So item can be found with Ranorex, but can't be found with Selenium
4) I inspected the repository and determined strange behavior: the path to the input field isn't appropriate to the existing path.
That the full path to the input field:
/form[@title~'^Test\ Automation\ for\ GUI\ T']/container[@accessiblerole='Grouping']/container[1]/element[@accessiblerole='None']/container[@accessiblename~'^Test\ Automation\ for\ GUI\ T']/element[1]/element/element[@accessiblerole='None']/element[1]/element[@accessiblerole='None']/element[@accessiblerole='None']/element[@accessiblerole='None']/element[2]/?/?/text[@accessiblename='Search Ranorex ...']
As we can see - the path ends with the tag: //text,
but the true path equals to '//div[@class='input-group']/input' and should be ends with '//input'. In addition, Ranorex Selocity totally does not found the '//text' path!
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
I understood the reason - I switched between desktop and Selenium regimes, but can't back to Web regime.
How I can back to the Web regime?
Why do not work the Selenium regime?
How I can back to the Web regime?
Why do not work the Selenium regime?
Re: How to configured and use WebDriver in the Ranorex?
You can switch between local web and a selenium endpoint via the endpoint panel. Select "Local host" for local web.
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
Hello Valeriy777,
The RanoreXPath "/form[@title~'^Test\ Automation\ for\ GUI\ T']/..." is not a dom path. It is the browser form. This happens if the browser is not instrumented. Have you instrumented the browser? If you are trying to track a browser which was open with webdriver, then the Ranorex plugin for that browser will not work. Do you get the same RanoreXPath if you open the browser manually?
Regards,
McTurtle
The RanoreXPath "/form[@title~'^Test\ Automation\ for\ GUI\ T']/..." is not a dom path. It is the browser form. This happens if the browser is not instrumented. Have you instrumented the browser? If you are trying to track a browser which was open with webdriver, then the Ranorex plugin for that browser will not work. Do you get the same RanoreXPath if you open the browser manually?
Regards,
McTurtle
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
I executed the following step:McTurtle wrote: ↑Wed Jul 01, 2020 12:27 pm
The RanoreXPath "/form[@title~'^Test\ Automation\ for\ GUI\ T']/..." is not a dom path. It is the browser form. This happens if the browser is not instrumented. Have you instrumented the browser? If you are trying to track a browser which was open with webdriver, then the Ranorex plugin for that browser will not work. Do you get the same RanoreXPath if you open the browser manually?
Regards,
McTurtle
1) I created a new project
2) Then I chose the Recording1 module and press Record button
3) I created a simple script that set the text to the input field
4) I checked this "project" and all works well
5) In the next step, I created new endpoint with Selenium (connection is successful)
6) As a result, I try to launch the script (with Selenium endpoint) and nothing works - I got the "Filed to find element" exception.
And this is the main issue - I need to use WebDriver in the Ranorex project
Re: How to configured and use WebDriver in the Ranorex?
Hi,
As McTurtle pointed out, xpath starting with "form" is not a DOM-based xpath. And although form-based xpath can be used in Ranorex, Selenium will not be able to find element behind this xpath. Selenium Webdriver works only with DOM-based xpaths!
The reason why Ranorex recorded "form" and not "dom" xpath is most probably not installed, corrupted or disabled Ranorex plugin in given browser. Could you please try to track the problematic element with Ranorex Spy and eventually create a snapshot (not screenshot) and post it here?
As McTurtle pointed out, xpath starting with "form" is not a DOM-based xpath. And although form-based xpath can be used in Ranorex, Selenium will not be able to find element behind this xpath. Selenium Webdriver works only with DOM-based xpaths!
The reason why Ranorex recorded "form" and not "dom" xpath is most probably not installed, corrupted or disabled Ranorex plugin in given browser. Could you please try to track the problematic element with Ranorex Spy and eventually create a snapshot (not screenshot) and post it here?
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
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
Thanks.odklizec wrote: ↑Thu Jul 02, 2020 9:13 amHi,
As McTurtle pointed out, xpath starting with "form" is not a DOM-based xpath. And although form-based xpath can be used in Ranorex, Selenium will not be able to find element behind this xpath. Selenium Webdriver works only with DOM-based xpaths!
The reason why Ranorex recorded "form" and not "dom" xpath is most probably not installed, corrupted or disabled Ranorex plugin in given browser. Could you please try to track the problematic element with Ranorex Spy and eventually create a snapshot (not screenshot) and post it here?
This helps, - the repository now use DOM-based path (".//div[@class='input-group']/input[@type='text']"), and all works well with Ranorex endpoint.
But I still can't use the Selenium endpoint.
So, my question didn't change:
How to configured and use WebDriner in the Ranorex?
- I have the success Selenium endpoint connection,
- I have the simple script, that clicks by path ".//div[@class='input-group']/input[@type='text']"
- All works well with Ranorex endpoint
- Nothing work with Selenium endpoint (Failed to find item 'MyTest3Repository.TestAutomationForGUITestingRanore.SearchRanorex'.)
Re: How to configured and use WebDriver in the Ranorex?
Hi,
And what exactly is wrong with Selenium endpoint? In your last post, you mentioned that Selenium endpoint is created and connected. So you can run the test, but it fails somewhere? In this case, we need to know exact error message. Ideally, post entire Ranorex report. Thanks.
And what exactly is wrong with Selenium endpoint? In your last post, you mentioned that Selenium endpoint is created and connected. So you can run the test, but it fails somewhere? In this case, we need to know exact error message. Ideally, post entire Ranorex report. 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
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
Error message:odklizec wrote: ↑Fri Jul 03, 2020 7:42 amHi,
And what exactly is wrong with Selenium endpoint? In your last post, you mentioned that Selenium endpoint is created and connected. So you can run the test, but it fails somewhere? In this case, we need to know exact error message. Ideally, post entire Ranorex report. Thanks.
Failed to find item 'MyTest3Repository.TestAutomationForGUITestingRanore.SearchRanorex'
SearchRanorex full path = "/dom[@domain='www.ranorex.com']//div[@class='input-group']/input[@type='text']"
Re: How to configured and use WebDriver in the Ranorex?
Hi,
Could you please post entire project? You can zip it via menu Tools >> Compress solution and open folder menu.
Could you please post entire project? You can zip it via menu Tools >> Compress solution and open folder menu.
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
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
Re: How to configured and use WebDriver in the Ranorex?
Please see attachment
You do not have the required permissions to view the files attached to this post.
Re: How to configured and use WebDriver in the Ranorex?
Hi,
Well, Selenium works for me once there is added OpenBrowser action Have you tried to add OpenBrowser action? The thing is, that you are trying to access DOM (and its elements) while there is no webpage loaded Also, please try your test, with recording steps instead of jumping straight into code. User code is a nice and useful thing, but you should always try first steps with recording actions.
Well, Selenium works for me once there is added OpenBrowser action Have you tried to add OpenBrowser action? The thing is, that you are trying to access DOM (and its elements) while there is no webpage loaded Also, please try your test, with recording steps instead of jumping straight into code. User code is a nice and useful thing, but you should always try first steps with recording actions.
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