πŸ–₯️Viewport

Configure the viewport, or browser window dimensions, for all tests.

The Viewport Settings

Let's take a look at the default viewport settings inside of pylenium.json

"viewport": {
    "maximize": true,
    "width": 1440,
    "height": 900,
    "orientation": "portrait"
}

By default, Pylenium will open each browser window in "maximized mode", meaning that the browser window will take up the entire screen that it's running on.

With "maximize": true, Pylenium ignores the width, height, and orientation values

maximize

  • true (default) - The browser window will take up the entire screen

  • false - Use the width, height, and orientation values to set the brower window dimensions

width & height

These are useful if you want all tests to use the same dimensions instead of dynamically changing to the current screen. For example, running tests locally will probably be different than when running them in your Continuous Integration pipeline.

Another useful scenario is for testing your website on different mobile device sizes!

Make sure maximize is set to false

orientation

  • "portrait" (default)

  • "landscape"

Last updated