It is possible to automate user interfaces using the Squish API from existing Python scripts using a special Python module called squishtest.
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:
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:
- Using Squish Functions in Python Modules/Packages (Squish Manual)
- Article - Using Squish functions in your own Python modules or packages (kb article)