Error message "No matching ... overload found Following overloads are available"

Skip to end of metadata
Go to start of metadata

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(s) where s is a string and i is the number it represents. But if you do this in a Squish test script it won't work. Instead you'll get an error message like this:

Unfortunately, Squish defines its own int() (and type()) function, so the standard Python versions of these functions are not directly available.

It is, of course, possible to access the original standard Python functions by accessing them via the __builtin__ module. This involves explicitly importing the __builtin__ module as follows:

Now the rest of the script can use Python's standard int() (and type()) functions by using their fully-qualified names. For example:

See also

builtin builtin Delete
overload overload Delete
typeerror typeerror Delete
python python Delete
module module Delete
str str Delete
message message Delete
__builtin__ __builtin__ Delete
int int Delete
error error Delete
no_matching_overload no_matching_overload Delete
scripting scripting Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.