To fix your code, try the following:
topPos = int(someClass.get_element_pos('element'))
Why?
When I copy and paste the source code, I get the following:
...
1440 >= 1500
False
1470 >= 1500
False
1500 >= 1500
True
A small change that I can find for your code that reproduces the behavior you see is to change the first line to this:
maxCounter = '1500' # string instead of integer
After making this change, I can also see the result you get:
1410 >= 1500
False
1440 >= 1500
False
1470 >= 1500
False
1500 >= 1500
False
1530 >= 1500
False
etc..
source
share