我有这个与 Selenium 一起使用的黄瓜步骤定义,但是当我使用poltergeist驱动程序NotImplementedError
尝试它们时我得到了。
phantom.js 已安装,我什至可以从看起来正确的步骤定义中截取屏幕截图。我正在测试一个 Ember.js/Rails 应用程序。看到它正确地访问了页面,但是当我尝试查找链接时它失败了。
When(/^I visit the App$/) do
visit("/")
end
Then(/^I should see link "(.*?)"$/) do |arg1|
find_link(arg1)
end
When(/^I click "(.*?)"$/) do |arg1|
find_link(arg1).click
end
When(/^I fill in "(.*?)" with "(.*?)"$/) do |arg1, arg2|
fill_in arg1, :with => arg2
end
When(/^I click "(.*?)" button$/) do |arg1|
find_button(arg1).click
end
确切的错误是这样的:
When I visit the App # features/step_definitions/sign_in_steps.rb:1
Then I should see link "Sign Up" # features/step_definitions/sign_in_steps.rb:5
NotImplementedError (NotImplementedError)
./features/step_definitions/sign_in_steps.rb:6:in `/^I should see link "(.*?)"$/'
features/sign_in.feature:9:in `Then I should see link "Sign Up"'