Features

Change desktop screen resolution

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
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["screen-resolution"] = "1280x1024"
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("screen-resolution", "1280x1024");
$caps = array(
  "screen-resolution" => "1280x1024"
);
capabilities = {
  "screen-resolution" : "1280x1024"
}
const capabilities = {
  "screen-resolution" : "1280x1024"
}
// For Chrome browser
OpenQA.Selenium.Chrome.ChromeOptions chromeCapability = new OpenQA.Selenium.Chrome.ChromeOptions();
capability.AddAdditionalCapability("resolution", "1280x1024", true);

// For Edge browser
OpenQA.Selenium.Edge.EdgeOptions edgecapability = new OpenQA.Selenium.Edge.EdgeOptions();
capability.AddAdditionalCapability("resolution", "1280x1024");

// For IE browser
OpenQA.Selenium.IE.InternetExplorerOptions ieCapability = new OpenQA.Selenium.IE.InternetExplorerOptions();
capability.AddAdditionalCapability("resolution", "1280x1024", true);

// For Firefox browser
OpenQA.Selenium.Firefox.FirefoxOptions firefoxCapability = new OpenQA.Selenium.Firefox.FirefoxOptions();
capability.AddAdditionalCapability("resolution", "1280x1024", true);

// For Safari browser
OpenQA.Selenium.Safari.SafariOptions safariCapability = new OpenQA.Selenium.Safari.SafariOptions();
safariCapability.AddAdditionalCapability("resolution", "1280x1024");

// For Opera browser
OpenQA.Selenium.Opera.OperaOptions operaCapability = new OpenQA.Selenium.Opera.OperaOptions();
operaCapability.AddAdditionalCapability("resolution", "1280x1024");

The browser window is not maximized when starting a Selenium test. Changing the screen resolution does not maximize browser.
See how to maximize and resize the browser window.