Selenium慢点击动作只有localhost

我在本地运行selenium,但在查找和点击时速度非常慢。

test_helper.rb中

Capybara.register_driver :selenium do |app| Capybara::Selenium::Driver.new(app, browser: :chrome) end 

这是我页面上的测试:

 feature "dashboard" do include Warden::Test::Helpers scenario "test1", :js => true do visit root_path visit new_user_session_path #any of this are super slow #find("a[href='#{/users/sign_up}']").click #page.find(:css, 'a[href="/users/passsword/new"]').click #page.find(:xpath, "//a[@href='/users/sign_up']").click end 

但是,访问行动几乎是即时的。

我尝试过另一个测试:

 feature "dashboard" do include Warden::Test::Helpers scenario "test1", :js => true do visit 'http://www.google.com.uy' page.find(:xpath, "//a[@href='//www.google.com.uy/intl/es-419/about.html?fg=1']").click end 

它奏效了。

如何在我的网站上找到原因? new_user_session_path是设计的默认模板和控制器。

不得不禁用Turbolinks。 Capybara工作但通过byebug执行命令时速度很慢