API Reference Manual

This chapter documents the script APIs which can be used by Squish test scripts. See the Tutorials and the User Guide's User Guide section for complete examples that make use of all the main features that Squish's API offers. (Note that extension APIs are documented in the User Guide: QML Extension API (Qt), JavaScript Extension API (Web), and Java Extension API for Custom Widgets (Java).)

Note: Convenience Function Parameters

Those functions that take an objectOrName argument can be passed a reference to an object or the symbolic or real (multi-property) name of an object. Those functions that take an object argument must be passed an object reference, and those functions that take an objectName must be passed an object's symbolic or real name. (Object references are returned by the Object waitForObject( objectOrName), Object waitForObjectExists( objectOrName), Object findObject( objectName) and SequenceOfObjects findAllObjects( objectName) functions.)

In this chapter we begin by looking at the special functions that testers create to make their tests usable by Squish. Then we will look at the differences between the supported scripting languages, then Squish's API is covered, then the GUI toolkit-specific convenience APIs are covered, and finally some scripting language-specific issues are dealt with. Last but not least, the script API specific to behavior-driven tests is discussed.

© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.