如果您的表单有验证码(我正在使用人性化的宝石)。如何填写表格并在写黄瓜功能时发送并获得预期结果。验证码形式的黄瓜功能
Scenario: Sign Up with Valid Data
Given I am not authenticated
And I am on the sign in page
When I follow "Sign up"
And I fill in the following:
| Name | Administrator |
| Email | [email protected] |
| Password | 123456 |
| Password confirmation | 123456 |
And I fill in the captcha correctly
And I press "Sign Up"
Then I should be on the new_company page
And I should see "Hello Manoj"
现在我可以写一个步骤定义匹配/ ^我正确填写catcha $ /但是必须放在那里?
温柔一点,我是黄瓜新手,到目前为止一直令人沮丧。我不是新手Rails或编程,否则。
是的,这是最合理的解决方案。试想一下步骤的定义“并且我正确填写captcha”:-) – 2010-12-21 11:20:47
您是否仅在测试中禁用它?这种验证码可以在本地和分期中使用。 – 2016-04-16 08:54:06