On Feb 22, 8:25 pm, sridhar249 <sridhar...@gmail.com> wrote: > Hi Chuck, > > browser.select_list(:how, 'what').fire_event('onchange') is not > working. (It does not refresh the calendar) > > Here is my code: > > b.span(:id, "sideMenu").div(:id, > "sideMenutimesheet_ctl00").select_list(:index, 0).set("May") > sleep 5 # I don't really need this sleep. But just adding it in case > it is required. > b.span(:id, "sideMenu").div(:id, > "sideMenutimesheet_ctl00").select_list(:index, > 0).fire_event("onclick") > > I even tried the following fire events as well. But that did not work > either. > > onclick, onmouseup, onmousedown, onmouseover > > Any other ideas? > > (strange, thought I replied but do not see it here)
two observations, first, if ID attribute values are following spec they are unique on the page, so you don't need to specify the span that holds the div if you have an id for the div second, if you are using newer watir (2.0+) or watir-webdriver, the index 0 is the default selector. also note of your examples or what you say you tried is 'onchange' .. I'd try the following, if it does not work then please show us the HTML for the select list b.div(:id => "sideMenutimesheet_ctl00").select_list.set("May") b.div(:id => "sideMenutimesheet_ctl00").select_list.fire_event("onchange") -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com