Overview¶
Squish for Windows can automate Google Chrome Apps on Windows via its UI Automation extension, which taps into the UI Automation accessibility support in Google Chrome - if the latter is enabled.
Because UI Automation support is by default disabled in Google Chrome (and therefore for Google Chrome Apps) it must be explicitly enabled by passing the parameter "--force-renderer-accessibility
" to chrome.exe
. To make this is a bit easier it is best to use a simple .bat file as AUT
in Squish.
Required Steps¶
Step 1 - Create chrome_app_launcher.bat
which starts Google Chrome's App Launcher¶
This only needs to be done one time.
Step 2 - Select chrome_app_launcher.bat
as AUT in Test suite settings¶
This only needs to be done one time.
Step 3 - Configure Squish's UI Automation extension to take precedence over other extensions¶
This only needs to be done one time, but should be done in a separate Squish for Windows package, because it alters the package configuration.
In file squish_dir/etc/extensions/win/uiautomation.ext
change the priority
in entry...
...to...
Step 4 - Recording & Replay¶
Now it should be possible record and replay on any Google Chrome App.
Example Test Script¶
Here is an example script recorded on the " Calculator " Chrome App by "Aidan":
Note that the two commands after startApplication()
are responsible for typing the name of the Chrome App that should be started.
(Please note that this script only serves for demonstrating the ability to record on Google Chrome Apps. Replaying this test script requires an names.py file with the symbolic names used in the script above. Also see Article - How Squish looks up Real Names from Symbolic Names .)