选中选择框具有与水豚某些选项

选中选择框具有与水豚某些选项,第1张

选中选择框具有与水豚某些选项

尝试使用capybara
rspec匹配器have_select(locator,options =
{})
代替:

#Find a select box by (label) name or id and assert the given text is selectedThen /^"([^"]*)" should be selected for "([^"]*)"$/ do |selected_text, dropdown|  expect(page).to have_select(dropdown, :selected => selected_text)end#Find a select box by (label) name or id and assert the expected option is presentThen /^"([^"]*)" should contain "([^"]*)"$/ do |dropdown, text|  expect(page).to have_select(dropdown, :options => [text])end


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5001481.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-14
下一篇2022-11-14

发表评论

登录后才能评论

评论列表(0条)

    保存