---
title: Change the desktop resolution with Selenium WebDriver
description: Modify the desktop resolution before your Selenium WebDriver test starts.
source_url:
  html: https://testingbot.com/support/web-automate/selenium/change-screen-resolution
  md: https://testingbot.com/support/web-automate/selenium/change-screen-resolution/index.md
---
# Change desktop screen resolution with Selenium

The TestingBot Desktop VMs (Windows, macOS and Linux) all support changing the screen resolution before a test starts.

We currently support the following screen resolutions:

 Value Type | Default Value | || string | "1280x1024" | 

 Platform | Resolutions || Windows/Linux | 

- 800x600 
- 1024x768 
- 1152x864 
- 1280x768 
- 1280x800 
- 1280x960 

- 1280x1024 
- 1400x1050 
- 1600x1200 
- 1680x1050 
- 1920x1080 
- 1920x1200 
- 2560x1440 

 |
| macOS | 

- 800x600
- 1024x768
- 1280x768
- 1280x800
- 1280x960

- 1280x1024
- 1366x768
- 1440x900
- 1600x900
- 1600x1200

- 1680x1050
- 1920x1080
- 1920x1200
- 2048x1536

 |

 |

[Java](https://testingbot.com#)[Python](https://testingbot.com#)[NodeJS](https://testingbot.com#)[Ruby](https://testingbot.com#)[PHP](https://testingbot.com#)[C#](https://testingbot.com#)

    ChromeOptions options = new ChromeOptions();
    options.setCapability("platformName", "WIN11");
    options.setCapability("browserVersion", "latest");
    options.setCapability("screen-resolution", "1920x1080");
    
    HashMap<String, Object> tbOptions = new HashMap<>();
    tbOptions.put("key", "API_KEY");
    tbOptions.put("secret", "API_SECRET");
    options.setCapability("tb:options", tbOptions);

    from selenium.webdriver.chrome.options import Options as ChromeOptions
    
    options = ChromeOptions()
    options.set_capability('platformName', 'WIN11')
    options.set_capability('browserVersion', 'latest')
    options.set_capability('screen-resolution', '1920x1080')
    options.set_capability('tb:options', {
        'key': 'API_KEY',
        'secret': 'API_SECRET'
    })

    const capabilities = {
      platformName: 'WIN11',
      browserName: 'chrome',
      browserVersion: 'latest',
      'screen-resolution': '1920x1080',
      'tb:options': {
        key: 'API_KEY',
        secret: 'API_SECRET'
      }
    };

    options = Selenium::WebDriver::Chrome::Options.new
    options.add_option('platformName', 'WIN11')
    options.add_option('browserVersion', 'latest')
    options.add_option('screen-resolution', '1920x1080')
    options.add_option('tb:options', {
      'key' => 'API_KEY',
      'secret' => 'API_SECRET'
    })

    $capabilities = [
        'platformName' => 'WIN11',
        'browserName' => 'chrome',
        'browserVersion' => 'latest',
        'screen-resolution' => '1920x1080',
        'tb:options' => [
            'key' => 'API_KEY',
            'secret' => 'API_SECRET'
        ]
    ];

    ChromeOptions options = new ChromeOptions();
    options.PlatformName = "WIN11";
    options.BrowserVersion = "latest";
    options.AddAdditionalOption("screen-resolution", "1920x1080");
    
    var tbOptions = new Dictionary<string, object>
    {
        ["key"] = "API_KEY",
        ["secret"] = "API_SECRET"
    };
    options.AddAdditionalOption("tb:options", tbOptions);

The browser window is not maximized when starting a Selenium test. Changing the screen resolution does not maximize the browser.   
See how to [maximize and resize the browser window](https://testingbot.com/support/web-automate/selenium/browser-window-size).

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
