Suppose you have an AUT that has a QStackedWidget and you want to verify how many widgets are in the stack.
Unfortunately, this doesn’t work: Python will throw an error “‘int’ object is not callable” at the line marked
This problem arises because QStackedWidgets have both a
count() function and a
count property, and when Squish is faced with a function and a property with the same name it always chooses the property.
The solution is simple — we just use the
count property, replacing the
Error line with: