Background:
Given I am on the "Login" page
And I am logged in as "ad...@test.com" using password "Test123!"
And I fill in "lastName" with "Smith"
And I select "CALIFORNIA" from "states"
And I fill in "postalCode" with "92646"
And I click on "Search" button
Scenario Outline: Login
Then I should see the home page
Bill Wright, Senior QA/Software Engineer
5395 Pearl Parkway, Suite 100 | Boulder, Colorado 80301
P 720.236.2035 | F 303.926.1398
www.tendrilinc.com | blog
--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
This way should be fixable, and is more efficient. Rather than trying
to include an Examples table, you should use a regular table:
Then I see xpaths as follows:
| xpath |
| xpath1 |
| xpath2 |
| ... |
And figure out how to parse this kind of table.
That said, it is questionable to put something as low-level as an
xpath into BDD-speak.
Bill
I wouldn't write this test as a Scenario Outline. It is just one test that checks for a variety ofthings on the page. I'd use a Data Table instead, so that the scenario only gets run once.But I wouldn't even do that. I'd rewrite it like this:Background:
Given I am on the "Login" page
And I am logged in as "ad...@test.com" using password "Test123!"
And I fill in "lastName" with "Smith"
And I select "CALIFORNIA" from "states"
And I fill in "postalCode" with "92646"
And I click on "Search" button
Scenario Outline: Login
Then I should see the home pageThen I'd write a step definition that actually verifies all that you want to see on the home page.The low-level details of the text and class type of UI widgets should probably not be exposed inthe cucumber feature file.Bill
Bill Wright, Senior QA/Software Engineer
5395 Pearl Parkway, Suite 100 | Boulder, Colorado 80301
P 720.236.2035 | F 303.926.1398
www.tendrilinc.com | blog
jon blog: http://technicaldebt.com twitter: http://twitter.com/JonKernPA