SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.22k stars 8.11k forks source link

-timeout -browserTimeout doesn't work #1379

Closed tikohatico closed 8 years ago

tikohatico commented 8 years ago

Hi there I had used -timeout for shutdown selenium when page loads to long or another time case. But then stopped doing this This day I tried to configure timeouts like

java -jar ~/work/selenium-server-standalone-2.48.2.jar  -browserTimeout=65 -timeout=60

but my options doesn't affect anything, when my test session starts it remains opened till standard timeout setting is applied - it seems 300sec. But I made test to do nothing for undefined time - so expected selenium to close the session in the time I set. Also the same when I use firefox and not phantomjs

Please take a look

tiko@tiko ~> java  -Dphantomjs.binary.path=/home/tiko/work/phantomjs-2.0.0/bin/phantomjs  -jar ~/work/selenium-server-standalone-2.48.2.jar  -browserTimeout=65 -timeout=60
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
20:47:29.821 INFO - Launching a standalone Selenium Server
20:47:29.859 INFO - Java: Oracle Corporation 24.79-b02
20:47:29.859 INFO - OS: Linux 3.19.0-15-generic amd64
20:47:29.874 INFO - v2.48.0, with Core v2.48.0. Built from revision 41bccdd
20:47:29.940 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match the current platform LINUX
20:47:29.940 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS, browserName=MicrosoftEdge, version=}] does not match the current platform LINUX
20:47:29.940 INFO - Driver class not found: com.opera.core.systems.OperaDriver
20:47:29.941 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
20:47:30.024 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
20:47:30.025 INFO - Selenium Server is up and running
20:47:39.665 INFO - Executing: [new session: Capabilities [{tags=[tiko, PHP 5.6.4-4ubuntu6.2], ignoreZoomSetting=false, browserName=phantomjs, name=Behat feature suite, browser=firefox}]])
20:47:39.677 INFO - Creating a new session for Capabilities [{tags=[tiko, PHP 5.6.4-4ubuntu6.2], ignoreZoomSetting=false, browserName=phantomjs, name=Behat feature suite, browser=firefox}]
20:47:39.686 INFO - executable: /home/tiko/work/phantomjs-2.0.0/bin/phantomjs
20:47:39.686 INFO - port: 6956
20:47:39.686 INFO - arguments: [--webdriver=6956, --webdriver-logfile=/home/tiko/phantomjsdriver.log]
20:47:39.687 INFO - environment: {}
[INFO  - 2015-12-14T18:47:40.155Z] GhostDriver - Main - running on port 6956
[INFO  - 2015-12-14T18:47:40.722Z] Session [27416ec0-a293-11e5-aa7a-fb1df5ad7eaa] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.0.0 Safari/538.1","webSecurityEnabled":true}
[INFO  - 2015-12-14T18:47:40.722Z] Session [27416ec0-a293-11e5-aa7a-fb1df5ad7eaa] - page.customHeaders:  - {}
[INFO  - 2015-12-14T18:47:40.723Z] Session [27416ec0-a293-11e5-aa7a-fb1df5ad7eaa] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.0.0","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"linux-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
[INFO  - 2015-12-14T18:47:40.724Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 27416ec0-a293-11e5-aa7a-fb1df5ad7eaa
20:47:40.774 INFO - Done: [new session: Capabilities [{tags=[tiko, PHP 5.6.4-4ubuntu6.2], ignoreZoomSetting=false, browserName=phantomjs, name=Behat feature suite, browser=firefox}]]
20:47:40.791 INFO - Executing: [set window size])
20:47:40.802 INFO - Done: [set window size]
20:47:40.832 INFO - Executing: [get: http://local.site.com/])
[INFO  - 2015-12-14T18:52:40.153Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
barancev commented 8 years ago

Should be fixed in 2.49.1