Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用fancybox2-rails gem 登录模态窗口,而水豚的方法fill_in(field, :with => value) 找不到该字段,如何测试它?我可以使用哪些其他工具?
我正在使用这种自定义方法来填写我的字段:
def fill_field_by_css(css_path, value) page.find(css_path).set value end
如果您的字段 ID 是#name,您可以使用fill_field_by_css('#name', 'your_value')
#name
fill_field_by_css('#name', 'your_value')