开发者

watir-webdriver on IE behaves differently then Chrome and FireFox in respect to selecting a value from select list

selectctrl = @browser.select(:xpath, "//select[id='foo']")
selectctrl.select("Open")
  • in FireFox and Chrome this fires other events in jquery, in IE, you see the UI change to Open for the select box, but nothing is fired
  • I have looked at the events fired in firebug and tried to call fire_event("change") and other events that are shown, but nothing works
  • Code works in FireFox 5, Chrome 12, does not work in IE 9 using
  • l开发者_Python百科atest gems on Ruby 1.8.7 patchlevel 334 on Windows


Try:

selectctrl.select 'open'
selectctrl.fire_event 'change'

You should avoid using xpath, it is problematic in IE, and less readable

selectctrl = @browser.select :id => 'foo'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜