About Visual Testing

Applies to CrossBrowserTesting SaaS, last modified on January 10, 2023

Screenshot testing process

When a user launches a screenshot test either via our website or our API, each browser requested is inserted into a queue. As the system processes a request for a browser, here are the steps taken to achieve the results.

  1. The operating system is booted from a locked image.

  2. The ScreenshotDriver launches the requested browser.

  3. The page is loaded for the requested URL.

  4. If the page requires Basic (HTTP) Authentication, the credentials are supplied.

  5. If a Login Profile or Selenium Builder Script was requested, the authentication method or script is applied.

  6. Maintenance tasks are run such as ensuring the document is ready and the browser window is maximized.

  7. If the user requested a delay for additional page rendering, the system pauses.

  8. The windowed screenshot is created and delivered back to the results page.

  9. The browser and web page is analyzed in preparation for a fullpage screenshot.

  10. The web page is scrolled and a screen capture is saved for each viewport scrolled until the bottom of the page is reached.

  11. The fullpage screenshot is built from the screen captures so that final resulting image looks seamless.

  12. The chromeless screenshot is created by removing toolbars from the fullpage image.

  13. The page's DOM is captured as JSON for screenshot comparison feature.

  14. The page's HTML source is saved for reference.

  15. The screenshot test is marked complete and results are returned to the client.

  16. The operating system instance is cleaned up and torn down.

Additional information

The windowed screenshot is delivered as soon as it is ready. If the ScreenshotDriver is unable to complete the fullpage screenshot process, the screenshot test is marked as failed and no time is deducted from your account for the test, even though the windowed screenshot is still available in the results.

How long do screenshots take to produce

On average, a single screenshot should take approximately one minute per browser. Some web pages may take up to a minute and a half, whereas the fastest seen are around a half a minute.

These figures do not include the time waiting on a configuration (like Mac OSX 10.6) to become available during peak hours, nor does it include the time for the configuration to boot up and begin running the screenshot process, which is usually only a few seconds.

The responsiveness of the website host, the speed of Internet routing, the number of elements on the page, and the browser's rendering time can affect how quickly a page loads and is deemed ready for screenshots. As a screenshot test runs, the browser is scrolled and the screens are captured in order to append together the final full page screenshot, so the length of the page is another factor in the overall timing.

From an accounting standpoint, you are only charged for the time the screenshot process begins up until the time the full page screenshot is complete. No time is charged for the loading or tear down of the configuration before and after the test is run.

Screenshot glossary

Windowed screenshot

Image of a web page within a browser as a user will initially see it on their monitor.

Fullpage screenshot

Image of a fully scrolled web page from top to bottom within a browser. This is created by scrolling a web page, calling screen captures, and appending, or pasting, the images together.

Chromeless screenshot

Same as the Fullpage Screenshot with the browser’s chrome (the toolbars, scroll bars, and status bars) removed. This is only the rendered HTML of the page from top to bottom.

Viewport

The viewable area of the web page that can be seen within the browser. This area changes as a web page is scrolled vertically.

Screen capture

A snapshot image of the browser during the screenshot creating process.

ScreenshotDriver

The software that "drives" the browser during the screenshot process, backed by the Selenium browser automation framework.

Highlight search results