Page 1 of 1

Open Browser to Windows Explorer

Posted: Tue Oct 23, 2012 6:43 pm
by regex
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):

Re: Open Browser to Windows Explorer

Posted: Tue Oct 23, 2012 10:00 pm
by Ciege
This works for me...

Code: Select all

ProcessStartInfo startInfo = new ProcessStartInfo("iexplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
startInfo.Arguments = URL;
Process.Start(startInfo);

Re: Open Browser to Windows Explorer

Posted: Wed Oct 24, 2012 10:00 am
by Support Team
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