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

To change the screen resolution, please specify the screen-resolution parameter in the browserWSEndpoint URL.

const pw = require('playwright-core');

(async () => {
  const browser = await pw.chromium.connect({
    wsEndpoint: 'wss://cloud.testingbot.com/playwright?key=api_key&secret=api_secret&browserName=chrome&browserVersion=latest&screen-resolution=1600x900',
  });
  const context = await browser.newContext();
  const page = await context.newPage();

  await page.goto('https://testingbot.com/');
  await page.screenshot({ path: 'screenshot.png' });

  await browser.close();
})();

Changing the screen resolution does not resize the viewport. To change the viewport with Playwright, please use page.setViewportSize.