Hello, I can't understand one thing with logic in python. Here is the code:
maxCounter = 1500
localCounter = 0
while True:
print str(localCounter) + ' >= ' + str(maxCounter)
print localCounter >= maxCounter
if localCounter >= maxCounter:
break
localCounter += 30
And the result output:
...
1440 >= 1500
False
1470 >= 1500
False
1500 >= 1500
False
1530 >= 1500
False
1560 >= 1500
False
...
And I have infinity cycle there. Why?
topPos = someClass.get_element_pos('element')
scrolledHeight = 0
while True:
print str(scrolledHeight) + ' >= ' + str(topPos)
print scrolledHeight >= topPos
if scrolledHeight >= topPos:
print 'break'
break
someClass.run_javascript("window.scrollBy(0, 30)")
scrolledHeight += 30
print scrolledHeight
time.sleep(0.1)