Hi, You can also try to use a hover method. A while back fire_event worked. However. This is what one user does, that may work for you.
http://stackoverflow.com/questions/9272533/watir-fire-event-is-not-working-where-as-click-works-fine-in-ie On Wednesday, February 26, 2014 7:30:51 PM UTC-7, Yutzin Wong wrote: > > Hi,I started using watir few days ago, and still can find the way to reach > a dojo object. > I am using the following code, in order to display a Menu with the right > click (In Selenium context menu). > > > # encoding: utf-8 >> require 'watir-webdriver' >> b = Watir::Browser.new >> >> >> b.goto 'localhost:8080/swbadmin' >> b.text_field(:name => 'wb_username').set 'admin' >> b.text_field(:name => 'wb_password').set 'webbuilder' >> b.button(:text => 'Login').click >> >> a = b.div(:class => 'dijitTreeNodeContainer').div(:class => >> 'dijitTreeIsRoot').div(:class => 'dijitTreeRow').span(:class => >> 'dijitTreeContent') >> c= a.span(:text => 'tst') >> c.right_click >> > > The thing is that dijitTreeNodeContainer is made by a dojo. So i have to > wait until it loads all the information, I tried to use Watir::wait.until{ > span(:text => 'tst').visible ?} but it dindn't work. > With this code without the line > >> c= a.span(:text => 'tst') >> > and with c.click, I'm able to click the default TreeContent, but when I > try with right click or double_click, it throws an exception ( ..cannot > preform native interactions...) > I attach the html code of the dojo objects when the page is fully loaded > and the image of what I'm expecting to do. > > Thanks! > -- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
