Page 1 of 1

How to open a new web page in a cross browser test?

Posted: Fri Jan 30, 2015 2:22 pm
by Fergal
If a module starts by opening google.com in a web browser, how can a step be recorded, to open yahoo.com, without clicking on a link or typing the URL into the browser address bar?

Thanks!

Re: How to open a new web page in a cross browser test?

Posted: Fri Jan 30, 2015 2:36 pm
by odklizec
Hi,

I'm not quite sure I understand your problem. Can't you just add "Open Browser" action to your recording? Or do you want to open a url in existing instance of web browser? Please be more specific about your issue.

Re: How to open a new web page in a cross browser test?

Posted: Fri Jan 30, 2015 4:14 pm
by Fergal
odklizec wrote:do you want to open a url in existing instance of web browser?
Thanks odklizec, that's exactly what I would like to do. The test step should work for all browsers and on Ranorex 5.2.2.

Re: How to open a new web page in a cross browser test?

Posted: Fri Jan 30, 2015 4:31 pm
by krstcs
Use the InvokeAction.Navigate(string url) function.

Drag your /dom element onto the action table and select Invoke Action from the menu. Then select Navigate and put in the url you want to use. You can pass it in as a variable if you want.

Re: How to open a new web page in a cross browser test?

Posted: Mon Feb 02, 2015 11:56 am
by Fergal
Thanks krstcs, that works and the test shown below is running successfully.

Image

Re: How to open a new web page in a cross browser test?

Posted: Mon Feb 02, 2015 3:24 pm
by krstcs
You're welcome!