How to find out which JavaScript events fired? -
i have select list:
<select id="filter"> <option value="open" selected="selected">open</option> <option value="closed">closed</option> </select>
when select closed
page reloads. in case shows closed tickets (instead of opened). works fine when manually.
the problem page not reload when select closed
watir:
browser.select_list(:id => "filter").select "closed"
that means javascript event not fired. can fire events watir:
browser.select_list(:id => "filter").fire_event "onclick"
but need know event fire.
is there way find out events defined element?
looks firebug (firefox add-on) has answer:
- open firebug
- right click element in html tab
- click
log events
- enable console tab
- click persist in console tab (otherwise console tab clear after page reloaded)
- select
closed
(manually) there in console tab:
... mousemove clientx=1097, clienty=292 popupshowing mousedown clientx=1097, clienty=292 focus mouseup clientx=1097, clienty=292 click clientx=1097, clienty=292 mousemove clientx=1096, clienty=293 ...
source: firebug tip: log events
Comments
Post a Comment