Page 1 of 1

problem with webdocument navigate method

Posted: Wed Feb 02, 2011 8:20 am
by ashishabrol
Hi

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
doc.Navigate("www.twitter.com");

with above syntax ranorex instructs the web page to go to "www.oldpageurl.comwww.twitter.com". Which will never work.

can you someone tell me whats wrong?

thanks
Ashish Abrol

Re: problem with webdocument navigate method

Posted: Wed Feb 02, 2011 9:37 am
by Support Team
Hi,

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:
doc.Navigate("http://www.twitter.com");
Kind regards,
Tobias
Support Team