Arvind
Arvind

Reputation: 2779

test case for hidden field is not working with cucumber

fill_in "user_role", :with => @visitor[:role]

This is checking simple input field but input field with hidden it is not working for that is there any other method for hidden field.

Upvotes: 1

Views: 812

Answers (1)

Sachin Singh
Sachin Singh

Reputation: 7225

hidden_field = find :xpath, "//input[@id='id_of_hidden_field']"
hidden_field.set "hello world"

Upvotes: 1

Related Questions