我想做以下但不能由于fill_in的性质期望定位器作为第一个参数.
find(:css, "input[id$='donation_pledge_hundreds']").fill_in :with => "10"
Run Code Online (Sandbox Code Playgroud)
我也尝试过
element = find(:css, "input[id$='donation_pledge_hundreds']")
fill_in element.<method> , :with => "10"
Run Code Online (Sandbox Code Playgroud)
但是没有方法可以返回任何数据来识别fill_in元素.
有关通过正则表达式查找字段以与fill_in一起使用的最佳方法的任何想法吗?