How to use fill_in with find in Capybara (if possible)

前端 未结 5 571
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 18:02

I\'d like to do the following but can\'t due to the nature of fill_in expecting a locator as the first argument.

find(:css, \"input[id$=\'donation_pledge_hun         


        
5条回答
  •  执念已碎
    2020-12-07 18:50

    element = find(:css, "input[id$='donation_pledge_hundreds']")   
    element.fill_in with: "10"
    

提交回复
热议问题