Open Browser to Windows Explorer

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
regex
Posts: 48
Joined: Tue Aug 14, 2012 5:47 pm

Open Browser to Windows Explorer

Post by regex » Tue Oct 23, 2012 6:43 pm

I am trying to open a browser to a particular path:

Host.Local.OpenBrowser(pathVar, "IE", "", false, false);

This does not allow for a string varibale to be used as the startup location.

I also tried system.diagnostic.process.start("expoloer.exe", path);

But for some reason it doesn't open to the correct path during test runs.

Any suggestions on how to use a variable in place of the URL for:

Host.local.openBrowser("http://www.", "IE", "", false, false):

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Open Browser to Windows Explorer

Post by Ciege » Tue Oct 23, 2012 10:00 pm

This works for me...

Code: Select all

ProcessStartInfo startInfo = new ProcessStartInfo("iexplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
startInfo.Arguments = URL;
Process.Start(startInfo);
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Open Browser to Windows Explorer

Post by Support Team » Wed Oct 24, 2012 10:00 am

Hello,

@Ciege: Thank you for your solution!

In general, it should also work with the open browser function:
Host.Local.OpenBrowser(path, "IE", "", false, false);

I have used this function with a path variable to open a specific page.
What is the value of your path variable?
Did you get any error message by using this?

Which Ranorex version are you using?

Regards
Markus (T)
Ranorex Support Team
.
Image