problem with webdocument navigate method : Automation Tools

problem with webdocument navigate method

Ranorex Spy, Recorder, and Studio.

problem with webdocument navigate method

Postby ashishabrol » Wed Feb 02, 2011 9:20 am

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
ashishabrol
 
Posts: 13
Joined: Wed Feb 02, 2011 9:05 am

Re: problem with webdocument navigate method

Postby Support Team » Wed Feb 02, 2011 10:37 am

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation Tools

Who is online

Users browsing this forum: No registered users and 0 guests