views:

22

answers:

1

I'm learning Cucumber, but I can't make a step for just matching input tags.

What I have in the view is

<input type="submit" value="Press!" />

And what I tried in Cucumber are

Then the "input" field should contain "Press!"
Then the "type" field should contain "submit"

I just wanna confirm the existence for the input tags with certain values. No interaction.

+1  A: 

Try this:

Then I should see "Press!" within "input[type=\"submit\"]"

zetetic
Thanks. To me it's very strange that none of the frameworks have the easy ways to check the existence for form elements.
TK