"MINIMIZE_BROWSER_WINDOW" Command

Description: This command allows minimizing the browser window or changing the size of the window using pixels. The X and Y fields determine the position to move where X is for the right and left movements and Y is for up and down movements. You can use positive numbers to move the window from the left to the right in X or top to bottom in Y. You can use negative numbers to move right to left in X or bottom to top in Y. The default value is 0 for Y and 0 for X. Width and Height determine the size of the window in pixels.

Scenario (1): Suppose we want to maximize the browser by 100 points from left to right and 100 points from top to bottom.

Procedure:

  1. Define a step that navigates to a site by opening a window.

  2. Define a step with Minimize_Browser_Window command, select Set position checkbox and add 100 in X and Y fields

  3. Run your test case to see how the position of the window changes. Your steps will look like this:

Scenario (2): Suppose we want to change the browser size to 1366x768 pixels at run time.

Procedure:

  1. Define a step that navigates to a site by opening a window.

  2. Define a step with Minimize_Browser_Window command, select Set size checkbox and add 1366 in Width and 768 in Height fields

  3. Run your test case to verify that the browser size changes