-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Expected not to find xpath "/html/body/*" #1198
Comments
Navigating to about:blank was causing hangs when using chromedriver with selenium, so in 2.2 it changed to loading an empty html document - 6b1e42d - Do you happen to be using a remote browser that can't access the file? |
Which driver are you using? It's possible some of them haven't caught up with the 2.2.0 changes yet. We now require It's pretty bad that this breaks the driver API. Maybe this assertion should be removed. Pulling in @mhoran, @jferris @jcoglan and @jonleighton. |
Reset is synchronous in capybara-webkit. All WebPage instances are destroyed, local storage is deleted, and the cookie store is emptied. |
I'm using selenium webdriver, and yes I notice the browser is not navigating to a blank page. These are the drivers I tested this with (both failing in the same assertion): Capybara.register_driver :chrome do |app|
caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => [ "start-maximized" ]})
Capybara::Selenium::Driver.new(app, {:browser => :chrome, :desired_capabilities => caps})
end
Capybara.register_driver :firefox do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
profile.assume_untrusted_certificate_issuer = false
profile.native_events = false
Capybara::Selenium::Driver.new(app, :profile => profile)
end |
capybara-webkit destroys all WebPage instances and then instantiates a new WebPage object but does not navigate to about:blank. This looks to be consistent with Selenium. Prior to capybara-webkit 0.14.0 we navigated to about:blank on reset (thoughtbot/capybara-webkit@1264113). |
ok, but notice I'm not using capybara-webkit, but selenium webdriver, maybe could we have a config setting to turn that off for a specific driver? |
There is an additional problem with the behavior in 2.2.0: |
For what it's worth: in Terminus, I cheat a little bit by disabling Navigating to |
awesome, thanks |
I'm getting errors after every scenario after upgrading to 2.2.0, the problem is this assertion is failing:
https://github.com/jnicklas/capybara/blob/master/lib/capybara/session.rb#L81
expected not to find xpath "/html/body/*", found ...
tested using last versions of chrome and FF, with selenium driver on Windows.
I'm not sure, but it seems the reason is the browser is not navigating to a blank page, as supposed to.
(tests work fine using 2.1.0)
The text was updated successfully, but these errors were encountered: