I'm writing some automated tests using Capybara/RSpec, I choose/configure the driver by using this little bit of ruby:
Capybara.register_driver :selenium_chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
I'm testing whether or not a button I click is opening a popup window and that the window is displaying the content it should. The issue is that when the test opens the window, the Google Chrome popup blocker blocks it, causing the tests to fail. Disabling the blocker from the options menu does not work. Also, I'm afraid that once I run these on the server it will cause the same issue.
Is there a way to disable the popup block for the tests automatically?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…