problem with webdocument navigate method

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 13
Joined: Wed Feb 02, 2011 8:05 am

problem with webdocument navigate method

Post by ashishabrol » Wed Feb 02, 2011 8:20 am


I have recently started using ranorex and have an issue finding the correct syntax for navigating to a new website using ranorex.webdocument.navigate method.

Here is what I try to do
//find any open webpage - this works
Ranorex.WebDocument doc=Host.Local.FindSingle("/dom[@childIndex='1']");
//naviagte to new webpage - this doesnt work

with above syntax ranorex instructs the web page to go to "". Which will never work.

can you someone tell me whats wrong?

Ashish Abrol

User avatar
Support Team
Site Admin
Site Admin
Posts: 12174
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: problem with webdocument navigate method

Post by Support Team » Wed Feb 02, 2011 9:37 am


you have to put a "http://" before your url, otherwise the the url you want to navigate to is taken relative to the existing url.

So your code schould look like this:
Kind regards,
Support Team