-
Notifications
You must be signed in to change notification settings - Fork 31
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
Ruby with the Safari driver causes noSuchWindowException
#352
Comments
Another error encountered with Safari - Page/Frame not ready: #353 |
QA Notes: The following code occasionally caused Safari to throw a `noSuchWindowException` around 1 in 10 times, and I expect it never to do so now. ``` require "selenium-webdriver" require_relative "../../lib/axe/api/run" require "json" driver = Selenium::WebDriver.for :safari # driver.navigate.to "http://google.com" driver.navigate.to "https://dequeuniversity.com/demo/mars/" res = Axe::Core.new(driver).call Axe::API::Run.new.with_options puts JSON.pretty_generate res.results.to_h driver.quit ``` Note the commented `# driver.navigate to "http://google.com"`. Issue #353 notes that attempting to navigate to `http://google.com` would also occasionally cause an exception "Page/Frame not ready" to be thrown; it should no longer do so. Please uncomment this line, comment `driver.navigate.to "https://dequeuniversity.com/demo/mars/"` and test again. This fix is included here since they are closely related. Closes: #352 Closes: #353
Verified with the latest QA-build ( axe-core-gems_4.9.1.pre.396d719) on both Cucumebr and Rspec (which we are supporting now) using seleniium-driver. Not reproducing the issue, its working on safari browsser with out throwing nay error or exceptions. Cucumber-selenium:
Page executing:
Its working as expected. attached recordingvideo1403687178.mp4Rspec-selenium:
Page executing:
Its working as expected. attached recordingvideo3403687178.mp4Environment:
|
Similar to our Java integration with Safari found the way we were opening the window caused an error to throw more details
Using the below snippet:
Causes
NoSuchWindowException
:It doesn't happen every time but it is reproducible. We should look into replacing
axe-core-gems/packages/axe-core-api/lib/axe/api/run.rb
Line 93 in 40b06cf
Ruby doesn't have this documented, but it is in their source. code: https://github.com/SeleniumHQ/selenium/blob/eb0a32195277dfb6f058ce7ed6cd16322bd36067/rb/lib/selenium/webdriver/common/target_locator.rb#L53
The text was updated successfully, but these errors were encountered: