Label: python

Content with label python in Knowledge Base
Related Labels: overload, aut, path, no_matching_overload, message, typeerror, tcl, perl, ms-windows, install, load, auto-completion, builtin, qt, script, compile, object_is_not_callable, property, mac, more »

Page: Can I use Python modules?
Overview Yes, you can load Python modules in the standard way. For example: import os import sys import time Related Information Article Using Squish functions in your own Python modules or packages
Other labels: load, modules, scripting
Page: Changing the Python installation used by Squish binary packages
Table of Contents Introduction The Python configuration in the Squish IDE at {{Edit}} > {{Preferences}} > {{PyDev}} is not being used for executing Squish test scripts. Please do not make any changes at {{Edit}} > {{Preferences}} > {{PyDev}}, unless our technical support asks you ...
Page: Error message "ImportError No module named ..."
Symptoms In Squish running on Windows, a Python script might give an error message "ImportError: No module named ...." Solution The binary Squish for Windows package includes a strippeddown copy of the Python standard library, so some modules are missing. If you ...
Other labels: ms-windows, module, error, windows
Page: Error message "No matching ... overload found Following overloads are available"
Python makes a distinction between numbers and strings, so if you have a number as a string (e.g., "562"), and want to access the value as a number, you must explicitly convert it. Normally this is easily done using the standard Python syntax {{i = int ...
Other labels: builtin, overload, typeerror, module, str, message, __builtin__, int
Page: Error message "TypeError 'int' or 'float' object is not callable"
you get an error message like one of these: TypeError: 'int' object is not callable TypeError: 'float' object is not callable TypeError: 'str' object is not callable It probably means that you are trying to call a method when a property with the same name is available ...
Other labels: typeerror, object_is_not_callable, float, str, type, int, error
Page: Example - Getting A Tooltip (Qt)
Table of Contents How to use the Qt API via Squish to get a tooltip text It is easy to use the Qt API to access tooltips or other application object properties. Qt 4 and higher You can directly check an object's ...
Other labels: qt, tooltip, example, script
Page: How do I build my own Python version? (Mac)
Python, by default Squish links against the shared Python library. On Mac OS X it is possible to build Python either as a framework (which produces a shared Python library), or not as a framework (in which case, up to Python 2.5.1 you will always get ...
Other labels: howto, mac, build
Page: How do I get the application path?
get the path to the application in a test script the most technically accurate approach is to invoke {{squishrunner}} with the {{\\info}} {{applications}} parameters and to parse the resulting output to find the path relevant to the application. Here are some examples: With {{squishrunner}} and {{squishserver}} running on the same computer: squishrunner ...
Other labels: path, aut, tcl, pathname, scripting, perl, javascript
Page: Leverage the improved IDE integration of the Script-Based Object Map
name suggests the ScriptBased Object Map is much more tightly coupled to the scripting languages than the old TextBased Object Map. During development of the ScriptBased Object Map we spent a lot of time on improving the user experience when writing ...
Other labels: scripting, ide, javascript, perl, tcl, ruby, objectmap, auto-completion
Page: Property Problems (Qt)
Suppose you have an AUT that has a QStackedWidget and you want to verify how many widgets are in the stack. def main(): # ... # This is the QStackedWidget we are interested in contactsPane = waitForObject(":ContactsStackedFrame") count = contactsPane.count() # Error test.verify(count == 5) Unfortunately, this doesn't ...
Other labels: property, function, callable