Questions tagged «watir»

4
如何找出触发了哪些JavaScript事件?
我有一个选择列表: <select id="filter"> <option value="Open" selected="selected">Open</option> <option value="Closed">Closed</option> </select> 当我选择Closed页面时会重新加载。在这种情况下,它显示关闭的票证(而不是打开的票证)。当我手动执行时,它工作正常。 问题是当我Closed使用Watir选择时页面不会重新加载: browser.select_list(:id => "filter").select "Closed" 这通常意味着某些JavaScript事件不会触发。我可以使用Watir触发事件: browser.select_list(:id => "filter").fire_event "onclick" 但我需要知道要触发哪个事件。 有没有办法找出为元素定义了哪些事件?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.