This is a migrated thread and some comments may be shown as answers.

Start Browser Maximized

1 Answer 213 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 11 May 2011, 02:25 PM
How do you set up a test to launch a browser maximized?

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 11 May 2011, 06:42 PM
Hello Tom,

This can be done by adding a coded step (that process is described here). Add the following line of code to that step:

ActiveBrowser.Window.Maximize();

Then simply drag that step to the top of the test. I also recommend adding a short Execution Delay (described here) so the coded step does not attempt to maximize the browser before it actually loads.

If that step does not compile at first, you will need to add the System.Windows.Forms reference to the Project:

1. Click the Project tab.
2. Click the Show button in the Setting ribbon.
3. Click Script Options in the left column of User Settings.
4. Click "Add Reference."
5. Browse to the following folder:

32-bit machine: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client

64-bit machine: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client

6. Choose System.Windows.Forms.dll and click Open.
7. Click OK.
8. Execute your test.

Regards,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Tom
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or