Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SeleniumServer.py isn't incrementing "waiting" variable inside start_server() #2

Closed
mmaypumphrey opened this issue Aug 30, 2011 · 1 comment

Comments

@mmaypumphrey
Copy link

Lines 64-75 of /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py.saunter-0.5-py2.7.egg/saunter/SeleniumServer.py use a variable named "waiting" inside the start_server function. However, it's never getting incremented which allows one to experience a totally silent infinite loop if the Selenium server process doesn't start up earlier in the function. Here are the problematic lines:

make sure the server is actually up

server_up = False
waiting = 0
while server_up == False and waiting < 60:
    try:
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect(("localhost", 4444))
        s.close()
        server_up = True
    except socket.error:
        time.sleep(1)
        server_up = False

return server_up

In my case, I was having problems getting my own tests (which are based on the original python-selenium-pageobjects) to run in py.saunter so I backed up to trying the ebay example from github. The test was not working with Firefox 6.0, so I figured I'd try updating the .jar file in third_party/selenium to the latest version. At that point, since SeleniumServer.py expects to start up selenium-server-standalone-2.0b2.jar (which I had deleted before putting the latest version in third_party/selenium), I got an infinite silent loop.

@adamgoucher
Copy link
Member

Already fixed. Will be in 0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants