如何使用表单编写水豚集成测试jquery.selectize?
我想测试用户输入几个值。
这里的大多数答案都从底层改变了内容,并且与用户交互不同。这是一个接近用户所做操作的版本。
# waits for the text to show up in autocomplete and then selects it
def selectize_select(selectize_class, text)
find("#{selectize_class} .selectize-input input").native.send_keys(text) #fill the input text
find(:xpath, "//div[@data-selectable and contains(., '#{text}')]").click #wait for the input and then click on it
# convert css selector to xpath selector using Nokogiri::CSS.xpath_for
end
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)