Hello!
For testing our web site, we got a global variable $URL that's used to start the browser as well as for domain recognition in RanoreXPaths (/dom[@domain='$URL']//divtag...). This works fine for teh real server domain names, but does not work for early testing on localhost:port. If we're using the URL without prepended "http://", as we usually do, chrome doesn't open the page but stays empty (I veryfied this behaviour from the command line). If we're prepending the protocol definition, the XPaths stop working.
What to do?
Is there a way for RanoreX to open the page given even if it's localhost?
Could I calculate a second global variable from the first one by string concatenation?
(This is to avoid yet another global variable to be filled manually...)
Stay safe / Gesundheit!
Eike
Using localhost in browser start and RanoreXPath
Re: Using localhost in browser start and RanoreXPath
Hi Eike,
And what happens if you use "http://localhost...."? I think there should be no problem with using http:// even if you are using localhost? Have you tried to open the localhost page this way manually (via standalone web browser)?
And what happens if you use "http://localhost...."? I think there should be no problem with using http:// even if you are using localhost? Have you tried to open the localhost page this way manually (via standalone web browser)?
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: Using localhost in browser start and RanoreXPath
Eike, you have just precisely described an issue we've encountered here in the past few days. My web testing experience is minimal to say the least, but we had the exact same issue with the browser opening on a blank page when we attempted to include a ":port" number on a local host. Because of what we're attempting to do right now I just worked around it with a second variable, but I have yet to go back to the issue to try and resolve in a better manner because I too share your concerns with that approach.
So, no solution for you, I've not poked into it too much, but we share a similar experience at least!
So, no solution for you, I've not poked into it too much, but we share a similar experience at least!
Re: Using localhost in browser start and RanoreXPath
With http://, the browser starts with the correct page - but the RanoreXPaths using the URL variable stop working.odklizec wrote: ↑Tue Jul 07, 2020 7:48 amAnd what happens if you use "http://localhost...."? I think there should be no problem with using http:// even if you are using localhost? Have you tried to open the localhost page this way manually (via standalone web browser)?
Re: Using localhost in browser start and RanoreXPath
It's good to hear I didn't miss something obvious to everybody else.
If there's no solution but using a second variable, I think this would be a feature request to Ranorex:
Please enable starting a browser with a localhost:portnumber kind of URL if possible.