Page 1 of 1

How do KillBrowser and OpenBrowser work?

Posted: Thu Jul 26, 2012 6:51 pm
by lyn5000
What would be the manual equivalent of calling these methods with the following parameters? I want to know how these Ranorex methods do it so I can document how a user would do the same things to help us repro a bug with our web site that occurs sometimes after calling these methods. My guess as to how a user might do it shown as code comments.

Code: Select all

//Kills all iexplore.exe processes (a user would see these in task manager)
Host.Local.KillBrowser("IE"); 

//Does the method do this?
//1. Execute iexplore.exe with url as a parameter: iexplore.exe "http://www.ranorex.com"
//2. Click the maximize window button after IE opens
//Or this?
//1. Execute iexplore.exe with no parameters
//2. After IE opens, type "http://www.ranorex.com" in the address box, then click the maximize window button.
Host.Local.OpenBrowser("http://www.ranorex.com", "IE", "", false, true);

Re: How do KillBrowser and OpenBrowser work?

Posted: Fri Jul 27, 2012 12:22 pm
by Support Team
Hi,

KillBrowser really kills the process. As you said, a user may do this via the task manager (or command line).
Another possibility would be the CloseApplication action.

Open browser with "maximized=true" does the following: Execute iexplore.exe with url as a parameter: iexplore.exe "http://www.ranorex.com" and with maximized window.

If you want to reproduce this kind of error, the best way to do is by recording (press record - Global Recording - open your browser the way you want to, do some other things you want to reproduce, close the browser - press stop).

Kind Regards,
Larissa
Ranorex Support Team