Relax polling to check only every 100ms

This commit is contained in:
Antonio Scandurra 2015-04-07 17:53:05 +02:00
parent 1c7b473243
commit d494966759

View File

@ -16,12 +16,15 @@ ChromedriverURLBase = "/wd/hub"
ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBase}/status"
pollChromeDriver = (done) ->
http.get(ChromedriverStatusURL, (response) ->
if response.statusCode is 200
done()
else
pollChromeDriver(done)
)
checkStatus = ->
http.get(ChromedriverStatusURL, (response) ->
if response.statusCode is 200
done()
else
pollChromeDriver(done)
)
setTimeout(checkStatus, 100)
buildAtomClient = (args, env) ->
client = webdriverio.remote(