In general, working with Chrome is a smooth experience. It has good support for automation via WebDriver built in – the Chrome team seems to actively support using Chrome for automated testing. Because of this, we are able to manipulate Chrome when starting it for recording and replays to give the best possible experience.
However, there are a few use cases where we cannot configure Chrome for an optimal experience. Here we document how to set up Chrome on your test machines to handle these cases.
Note that you may see Chrome behaving differently during testcase replays (and load tests) than it behaves when you start it manually. This is because Chrome is started in a profile that is created on-demand and therefore has many Chrome’s default settings (those we cannot manipulate programmatically at startup).
To override many of the settings for new Chrome profiles, the windows Group Policy editor may be used. Chrome looks here to override many default behaviors. You can look at the list of the Chrome’s supported policies to see if your behavior is included there. After installing the group policy templates (linked from the supported policies page), you will be able to edit these from the Windows Group Policy editor (gpedit.msc).
Some apps use a popup window as part of the expected application flow. Because this is considered a poor design choice, Chrome blocks pop-ups by default.
To change this in the Group policies, look for the policy titled “Default popups setting” under the Content Settings group:
If you want Chrome to download PDFs instead of opening them in the built-in PDF viewer, there are two easy options.
The first is to delete/rename the PDF.dll file in Chrome’s installation folder. This will disable the Chrome PDF Viewer plugin for all user profiles.
The second is to use the group policy editor to disable the Chrome PDF Viewer plugin – see the next section.
If a Chrome plugin is interfering with your testcases, you can disable that plugin using the Windows Group Policy editor. In this example, the Chrome PDF Viewer plugin is disabled: