ruby - Capybara: Unable to find xpath "/html" (Capybara::ElementNotFound) -
i have read lot of articles online , have yet find resolution problem. using selenium webdriver:
capybara.default_driver = :selenium capybara.javascript_driver = :selenium class firefoxbrowser capybara.register_driver :firefox |app| client = selenium::webdriver::remote::http::default.new client.timeout = 280 capybara::selenium::driver.new(app, :browser => :firefox, :http_client => client) end end
here gemfile:
gem "rspec" gem "zentest" gem "cucumber" gem "selenium-webdriver" gem "capybara", "~> 2.1.0" gem "capybara-webkit", "~> 1.0.0" gem "simplecov", :require =>false, :group => :test gem "capybara-screenshot" gem "autotest", "~> 4.4.6" gem 'json', '~> 1.7.7' gem "rack-test", require: "rack/test" gem "poltergeist"
i running ruby code using capybara similar following:
visit 'https://username:password@website.com/other_params'
this call return xml information regarding whatever call made. there, check see if page has im looking for:
page.should have_content("content")
unable find xpath "/html" (capybara::elementnotfound)
this worked before upgraded capybara 2.1.0
now have upgraded cannot seem fixed. suggestions?
try update selenium-driver (it works me) :
gem 'selenium-webdriver', "~> 2.34.0"
Comments
Post a Comment