Squish 8.1.0 Known Issues

Last edited on

Known Issues - Squish 8.1.0 Release

Release Date: Dec 4th, 2024

Recommended Update: n/a

Squish for Web

Attaching to Chrome using the 'Qt QA Squish Integration' fails after the initial setup

We observed that Google Chrome will not automatically start the 'Qt QA Squish Integration' after having installed it into the users normal Chrome profile and launching Chrome. This creates a problem as the attaching to the running instance of Chrome will not work if the background tasks of the extensions are not running. Based on our testing this issue only occurs when the corresponding profile folder was never used with Squish previously and Squish never started the browser in that profile.

We suggest to follow the following additional steps, after installing the 'Qt QA Squish Integration' Extension into the normal users profile as outlined in the installation documentation to mitigate this problem.

  1. Ensure the 'Qt QA Squish Integration' extension is used for launching the browser, as outlined in the installation documentation
  2. Launch Chrome via Squish, either from the IDE or by running a Squish test that start Chrome using the startBrowser function
  3. Locate the default Chrome profile folder, see the Chromium project documentation for the location of the user-data directory on your system and locate the Default folder inside that folder
  4. Rename the Default folder to preserve the original Chrome profile
  5. Locate the Squish-specific Chrome profile folder: In the user data directory used by Squish locate the Default folder (%APPDATA%\froglogic\squish\squish_chrome_data_dir on Windows, $HOME/.squish/squish_chrome_data_dir on Linux/macOS)
  6. Copy the Default folder from the Squish-specific user data directory into the user data directory used by Chrome when started outside of Squish
  7. Copy the file com.froglogic.nmshelper.chrome.json from the NativeMessagingHost folder inside the Squish-specific user data directory over to the corresponding folder in the user data folder used by Chrome
  8. In case you want to use a port other than the default (9935) launch Chrome outside of Squish again and reconfigure the extension

Now launching Chrome outside Squish and attaching to it from a test script should work.

Other Workarounds:

Attaching to Chrome using the 'Qt QA Squish Integration' fails intermittently

In addition to the initial setup issue we also observed on some systems that the extension is being stopped by Google Chrome and subsequent attempts to attach to the browser would thus fail. This can cause intermittent failures to attach to the browser, usually all subsequent attemps fail then.

In order to mitigate this, an interaction with Chrome can be done before attaching to it, based on our testing. For example switching focus away from and back to the Chrome window using image-based testing, switching tabs inside of the Chrome window via image-based testing or even loading a new window by invoking the Chrome executable with a URL help to resume the Squish extension.

We would suggest to invoke the Chrome executable as part of the test script - using the script-specific API for launching subprocesses - with a simple URL, then attach to the browser and close the tab that has just been opened before continuing the normal test process.

An example script in python would look like this:

import subprocess

def main():
    subprocess.call(["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", "https://www.google.com"])
    attachToBrowser(9935)
    waitForObject({"type": "BrowserTab", "title": "Google"}).close()
    [..]

Other Workarounds:

Squish for Web on Linux arm64 packages not available

During testing the release we found that browser vendors are not yet providing their browsers for this platform directly. The distributions may provide packages for these browsers, but on our reference distribution Ubuntu 24.04 these are using the flatpack format which is not possible to automate via Squish at the moment.

Given the practical absence of browsers on this platform that would allow automation via Squish we decided against publishing the Squish for Web for Linux/arm64 packages at this point in time as we could not thoroughly test them.

We are monitoring the situation with browser availability and will provide the packages when the common usage scenarios can be supported.