-1

I am using Cucumber with Capybara. I have a page with listing of questions for a candidate. I want to check if all the radio buttons are selected for every answer before a candidate hits a radio button. If a candidate hits next button before answering all the questions, an error message is shown.

Please help me how do I test this feature.

4

1 回答 1

0

由于您添加了 Cucumber 标签,这就是我编写功能文件的方式。

Given Im in the question answer page
When I click next without answering all questions
Then I get an error message
When I click next after answering all questions
Then I go to the next page successfully.

既然你问过如何测试,那么测试的逻辑就很简单了

Click next without checking any radio box
Look for error message
Click next repeatedly after checking every box one till last but one
Look for error message
Click next after checking all radio boxes
No error message is seen.
于 2013-06-24T03:50:02.293 回答