I have read a lot of articles online and have yet to find a resolution to my problem. I am using Selenium webdriver:
Capybara.default_driver = :selenium
Capybara.javascript_driver = :selenium
class FirefoxBrowser
Capybara.register_driver :firefox do |app|
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 280
Capybara::Selenium::Driver.new(app, :browser => :firefox, :http_client => client)
end
end
Here is the 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 am running some ruby code using capybara similar to the following:
visit 'https://username:[email protected]/other_params'
this call will return an XML with information regarding whatever call i made. from there, i check to see if the page has what im looking for:
page.should have_content("content")
Unable to find xpath "/html" (Capybara::ElementNotFound)
This worked before we upgraded to capybara 2.1.0
Now that we have upgraded i cannot seem to get this fixed. Any suggestions?