我尝试从场景中获取字符串并设置为步骤定义。但它不起作用。
我的情况是
Scenario: Save Contact with empty field in setting page
Given I logged in
When remove "contact" manitary field
Then I click save button
Then I should see message
我的步骤定义是
When /^remove "([^"]*)" manitary field$/ do |n|
rows = all('##{n}-mapping-table tbody tr')
rows.each do |raw|
within raw do
find('.remove_nested_fields').click
sleep 1
end
end
find("##{n}-mapping-table thead tr th.add-new .insert_in_table").click
end
错误信息是An invalid or illegal string was specified (Selenium::WebDriver::Error::UnknownError)
我不知道这里有什么错误。
感谢您的意见