How do KillBrowser and OpenBrowser work?

Class library usage, coding and language questions.
lyn5000
Posts: 50
Joined: Mon Feb 13, 2012 5:52 pm

How do KillBrowser and OpenBrowser work?

Post by lyn5000 » Thu Jul 26, 2012 6:51 pm

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);

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

Re: How do KillBrowser and OpenBrowser work?

Post by Support Team » Fri Jul 27, 2012 12:22 pm

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
.
Image