b.select_list(:id, "MainContent_drpVehicleType").when_present.options.each do |option|
option.select
b.select_list(:id, "MainContent_drpMake").when_present.options.each do |option|
option.select
b.select_list(:id, "MainContent_drpModel").when_present.options.each do |option|
option.select
b.button(:id,"MainContent_imgbtnsearch").click
end
end
end
我有三个下拉菜单,每个下拉菜单取决于以前的值我必须一个一个地选择每个选项,然后单击 Button 。*虽然这样做得到以下错误* 元素不再附加到 DOM (Selenium::WebDriver::Error::StaleElementReferenceError)
也试过:
b.driver.manage.timeouts.implicit_wait = 3