Open ryan-roemer opened 9 years ago
More failures:
notes - wd.js
1) "before each" hook
0 passing (11s)
1 failing
1) "before each" hook:
Error: [get("http://backbone-testing.com/notes/app/")] Error response status: 23, NoSuchWindow - A request to switch to a different window could not be satisfied because the window could not be found. Selenium error: The driver is not focused on a window. You must switch to a window before proceeding. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 19 milliseconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'itako46144.prod.miso', ip: '172.20.46.144', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.7.0_75'
Session ID: null
Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{platform=MAC, cssSelectorsEnabled=true, javascriptEnabled=true, secureSsl=true, browserName=safari, takesScreenshot=true, version=7.0.6}]
at _stream_readable.js:908:16
Local reproduction of issue:
2 passing (14s)
1 failing
1) notes - wd.js adds a note and deletes it:
Error: [element.type("Delete Test")] Error response status: 10, StaleElementReference - An element command failed because the referenced element is no longer attached to the DOM. Selenium error: Element does not exist in cache (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 106 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'L-SB80X4FFT4-M.local', ip: '192.168.2.34', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_45'
Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{browserName=safari, takesScreenshot=true, javascriptEnabled=true, version=7.1.7, cssSelectorsEnabled=true, platform=MAC, secureSsl=true}]
Session ID: null
at _stream_readable.js:944:16
Seeing multiple tabs locally when things fail. May be an issue of:
Some screenshots after a hang with:
1 passing (38s)
1 failing
1) "before each" hook:
Error: [get("http://backbone-testing.com/notes/app/")] Error response status: 28, ScriptTimeout - A script did not complete before its timeout expired. Selenium error: Timed out awaiting response to command "get" after 30004 ms (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.01 seconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'L-SB80X4FFT4-M.local', ip: '192.168.2.34', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_45'
Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{browserName=safari, takesScreenshot=true, javascriptEnabled=true, version=7.1.7, cssSelectorsEnabled=true, platform=MAC, secureSsl=true}]
Session ID: null
at _stream_readable.js:944:16
two tabs:
Hi, we're getting the same thing... This bug is reeeaaalllyyy old, was there any solution to this?
Thanks!
https://travis-ci.org/PredixDev/px-view-header/builds/302764184
@mdwragg -- Unfortunately, never came back to this to reenable it. Kind of scary that Safari remains this flaky on SL!
Thanks for getting back to me Ryan! Yeah... worrying right? :-(
So, SafariDriver with selenium 2.x doesn't like (and doesn't support) multiple tabs and windows really. The code doesn't work well. It also doesn't help that selenium 2.x launches Safari in a separate process ignoring if it is currently running, and then kills it without closing tabs and windows. Basically, you need to ensure a clean session. Before a session, you need this set of steps: Launch Safari, close tabs and windows, quit Safari. (I do this in my personal test systems via UI automation with the accessibility APIs, not Selenium. AppleScript can do it too, it wraps those in "System Events"). Then, you can launch and get connected.
If it is simply NoSuchWindowException but you have a window, you need error handling at launch that looks at the array/list of window_handles objects and then switch_to_window(window_handles[0]) (pseudo code, exats vary by language bindings.).
BrowserStack + Safari is failing like 3/4 times or something.
Now Safari + SauceLabs is too which means there may be a poor test / bad adapter / bad library issue with how we deal with maybe client teardown and the browser window not being in focus / available ??
Different SL issues:
/cc @Maciek416