Using Squish as a module in other Python scripts, applications

Skip to end of metadata
Go to start of metadata

Table of Contents


It is possible to automate user interfaces using the Squish API from existing Python scripts using a special Python module called squishtest.

Obtaining a Squish package with the correct Python configuration

The squishtest module functionality is available free of charge and is included in all Squish packages.

However, if you are using a Python installation with a different point-release (or architecture) from what is included in the Squish package, the Python module will not be compatible with your Python installation. In this case, you need a Squish package custom built with a Python version that matches your Python installation.

To provide such a package we need the following from you:

  • The file <SQUISHDIR>/buildinfo.txt of your existing Squish package (if any; or information which Squish edition and configuration you want to use).
  • The exact Python version in which you plan to use squishtest module.
  • If your Python installation is configured for UCS-2 or UCS-4.

To determine the exact version and information about UCS-2 or UCS-4 please send us the output generated by running the following command:

Execute in a shell

Using the squishtest module in Python scripts

A simple Python script using squishtest might look like this:


The above example test script can be executed with a plain Python interpreter, as long as the environment is configured correctly for finding the squishtest module, its shared library dependencies and a few other items, as shown below:

On Unix: Execute in a shell/terminal
On Windows: Execute in cmd.exe

Related Information

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.