1
填充字段并按下按钮后,浏览器(由脚本打开)显示“正在等待127页的页面...” “但它从来没有去过任何地方(我等了30分钟)。我正在测试一个Ubuntu 10.04盒子。有任何想法吗?rails/rspec/capybara - 点击按钮后,无限'等待页面...'
describe "GET 'new'", :js => true do
it "will log in" do
@admin = FactoryGirl.create(:admin)
puts @admin
puts @admin.attributes
visit '/'
fill_in 'user_login', :with => @admin.email
fill_in 'user_password', :with => @admin.password
click_on 'Sign in'
response.should be_success
end
it "should be successful" do
visit '/things/new'
page.should have_xpath('//form')
end
end
你使用哪种驱动程序的水豚?在哪个平台上? 我在这个时候的猜测是JavaScript没有按照你的预期工作。 您可能想要在操作之间运行'save_and_open_page'以验证您是否正确拥有此页面。 – shigeya
我使用的默认值,我认为是硒(火狐说在WebDriver在右下角) –
这是有帮助的,至少它告诉我,我的Firefox的个人资料丢失。 –