测试用例隐藏字段不与黄瓜工作(test case for hidden field is not w

2019-08-19 05:13发布

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

这是检查简单的输入字段,但输入栏隐藏它不工作这是有隐藏字段的任何其他方法。

Answer 1:

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


文章来源: test case for hidden field is not working with cucumber