Set Browser Size using Navigator

Navigator object has SetSize and SetPosition actions. At the beginning of your test open a browser at specific URL and then set window size and position. This method works both for Rapise native browser connectors and Selenium.

function TestInit()
{
    Navigator.Open("http://libraryinformationsystem.org/react-js");
    Navigator.SetSize(800, 600);
    Navigator.SetPosition(100, 50);
}

Set Browser Size using WebDriver

If you are testing using pure Selenium API you may use Window.SetSize and Window.SetPosition methods.

function TestInit()
{
    WebDriver.CreateDriver();
    WebDriver.SetUrl("http://libraryinformationsystem.org/react-js");
    WebDriver.Window().SetSize(800, 600);
    WebDriver.Window().SetPosition(100, 50);
}

Set Browser Size in Browser Profile

Chrome

In CMD Line Parameters use

--window-size=600,800

Firefox

In CMD Line Parameters use

-width 800 -height 600

Internet Explorer

IE does not have command line parameters for setting initial browser size.

Set Browser Size in Selenium Profile

You may pass command line arguments for Selenium targets as well.

Chrome

Set arguments in Chrome Specific section.

["window-size=800,600"]

Firefox

Set arguments in Firefox Specific section.

["--width=800","--height=600"]

Internet Explorer

IE does not have command line parameters for setting initial browser size.