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

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Fri Jan 30, 2015 2:22 pm

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!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Fri Jan 30, 2015 2:36 pm

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.
Pavel Kudrys
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

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Fri Jan 30, 2015 4:14 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Fri Jan 30, 2015 4:31 pm

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.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Mon Feb 02, 2015 11:56 am

Thanks krstcs, that works and the test shown below is running successfully.

Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Mon Feb 02, 2015 3:24 pm

You're welcome!
Shortcuts usually aren't...