I got this to work by making it wait for a little bit after the save. I don't have time to put any code in here now, but you might want to try that. Someone else here suggested that, and it worked like a charm.
On Tue, Oct 26, 2010 at 7:41 PM, jpapa <[email protected]> wrote: > I'm attempting to use Watir to test a site developed on GWT. All > elements of the page are drawn by GWT and hence it relies very heavily > on Ajax. > > I have managed to click most elements,but there is a GWT tree widget > (which is basically a table with many nested divs) that simply won't > respond. > > I am able to locate the element I wish to click without issue. I've > tried it by :id, and :xpath and I know I am arriving at the correct > element. I've also confirmed with WatirMaker.rb that the element is > what I think it is. > > I've tried three ways of clicking on it - > > browser.div(:xpath, "//d...@id='DEVICES_GATEWAY']/div").click > > browser.div(:xpath, "//d...@id='DEVICES_GATEWAY']/ > div").fire_event('onclick') > > and a hack that worked elsewhere - > > browser.div(:xpath, "//d...@id='DEVICES_GATEWAY']/ > div").fire_event("onmouseover") > browser.div(:xpath, "//d...@id='DEVICES_GATEWAY']/ > div").fire_event("onmousedown") > browser.div(:xpath, "//d...@id='DEVICES_GATEWAY']/ > div").fire_event("onmouseup") > > However, none of these produce the click and there is no error > reported. I just fails silently. > > Other divs on the site can be clicked. Some using just .click and some > using the fire_events hack above. > > I'm totally stumped. > > I am using Windows 7 and IE 8. > > This tree widget is a significant UI element, so if I can't drive it I > think I'm sunk. (No pun intended.) > > > > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > [email protected] > http://groups.google.com/group/watir-general > [email protected]<http://groups.google.com/group/watir-general%[email protected]> > -- CJ Romberger Wildwood Interactive http://www.wildwoodinteractive.com/ 512.732.9916 PLEASE NOTE: I only check this email address about once a day! If you're a client, the fastest way to reach me is to login to Basecamp, OR email [email protected]. If you're NOT a client? Why not become one!? :) -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
