[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
Hi Adrian, You are trying to fire_event on the row. Could you provide the html or part of the html that contains the row? The row should have the mousedown event. The fireevent will only return after the modal dialog is clicked on. fire_event_no_wait will return after the call. Could you change your code to below and try again - I have removed the r.fire_event(onmouseover) which blocks if a modal dialog is shown here ... and used only r.fire_event_no_wait (onmousedown) require 'rubygems' require 'watir' class RunProg def Run() puts(Inside Run) ie = Watir::IE.new ie.goto app_link e = Watir::IE.attach(:title, /APP Title/) e.button(:id, menu_button_id).click d = e.div(:id, sub_menu_div_id) t = d.table(:index, 1) r = t.row(:index, 1) puts(r) r.fire_event_no_wait(onmousedown) # it should not block here puts e.url end end Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
Hi Adrian, The above code works fine for me ... by changing img.fire_event_no_wait(mousedown) to img.fire_event_no_wait (onmousedown) Maybe you could post the whole code that you are using ... so we could take a look at what you are exactly trying to do...?? Not sure on the threads -- I believe if there is a blocking part within a thread .. it should not block on the other threads. Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
Hi Tony, Thanks for trying to help me out. Here is the ruby script. The app is a servlet. Onmouseover works just fine, also fire_event(onmousedown) works, but this opens a modal dialog and the program is stuck on the fire_event line. require 'rubygems' require 'watir' class RunProg def Run() puts(Inside Run) ie = Watir::IE.new ie.goto app_link e = Watir::IE.attach(:title, /APP Title/) e.button(:id, menu_button_id).click d = e.div(:id, sub_menu_div_id) t = d.table(:index, 1) r = t.row(:index, 1) puts(r) r.fire_event(onmouseover) r.fire_event_no_wait(onmousedown) puts e.url end end RunProg.new.Run() On Wed, Aug 26, 2009 at 9:53 AM, Tony ynot...@gmail.com wrote: Hi Adrian, The above code works fine for me ... by changing img.fire_event_no_wait(mousedown) to img.fire_event_no_wait (onmousedown) Maybe you could post the whole code that you are using ... so we could take a look at what you are exactly trying to do...?? Not sure on the threads -- I believe if there is a blocking part within a thread .. it should not block on the other threads. Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
Sorry for the late reply, but the fire_event_no_wait method is not working: the expected action is not performed. Thanks On Thu, Jul 30, 2009 at 5:26 PM, Adrian Ghidu agh...@gmail.com wrote: I will definitely try that. Thanks Tony On Thu, Jul 30, 2009 at 5:03 PM, Tony ynot...@gmail.com wrote: Hi Adrian, You could add another method to the element.rb file in watir (below fire_event method) - def fire_event_no_wait(event) assert_enabled highlight(:set) object = #{self.class}.new(self, :unique_number, # {self.unique_number}) @page_container.eval_in_spawned_process(object + .fire_event(\# {event}\)) highlight(:clear) end Now you can call fire_events without waiting ... button.fire_event_no_wait(onmousedown) Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
More details are probably required. What action is performed instead, for instance? On Aug 25, 12:51 am, Adrian Ghidu agh...@gmail.com wrote: Sorry for the late reply, but the fire_event_no_wait method is not working: the expected action is not performed. Thanks On Thu, Jul 30, 2009 at 5:26 PM, Adrian Ghidu agh...@gmail.com wrote: I will definitely try that. Thanks Tony On Thu, Jul 30, 2009 at 5:03 PM, Tony ynot...@gmail.com wrote: Hi Adrian, You could add another method to the element.rb file in watir (below fire_event method) - def fire_event_no_wait(event) assert_enabled highlight(:set) object = #{self.class}.new(self, :unique_number, # {self.unique_number}) �...@page_container.eval_in_spawned_process(object + .fire_event(\# {event}\)) highlight(:clear) end Now you can call fire_events without waiting ... button.fire_event_no_wait(onmousedown) Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
No action whatsoever. On Tue, Aug 25, 2009 at 12:13 PM, Dylan mej...@gmail.com wrote: More details are probably required. What action is performed instead, for instance? On Aug 25, 12:51 am, Adrian Ghidu agh...@gmail.com wrote: Sorry for the late reply, but the fire_event_no_wait method is not working: the expected action is not performed. Thanks On Thu, Jul 30, 2009 at 5:26 PM, Adrian Ghidu agh...@gmail.com wrote: I will definitely try that. Thanks Tony On Thu, Jul 30, 2009 at 5:03 PM, Tony ynot...@gmail.com wrote: Hi Adrian, You could add another method to the element.rb file in watir (below fire_event method) - def fire_event_no_wait(event) assert_enabled highlight(:set) object = #{self.class}.new(self, :unique_number, # {self.unique_number}) @page_container.eval_in_spawned_process(object + .fire_event(\# {event}\)) highlight(:clear) end Now you can call fire_events without waiting ... button.fire_event_no_wait(onmousedown) Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
Hi Adrian, Please note - make sure you have edited the element.rb to include fire_event_no_wait code. Using the above fire_event_no_wait iam able to do a fire event on a mousedown. Here's an example of the mousedown and mouseover event (should work with any events)- require 'watir' iewin = Watir::IE.new iewin.goto(http://www.w3schools.com/jsref/tryit_view.asp? filename=tryjsref_onmousedown) img = iewin.image(:xpath, //img) img.fire_event_no_wait(mousedown) puts will return now without waiting for alert box ## wait for a few secs and the alert box will come up sleep 5 iewin.goto(http://www.w3schools.com/jsref/jsref_onmouseover.asp;) img = iewin.image(:alt, W3Schools) img.fire_event_no_wait(onmouseover) Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
There are so many definitions around modal dialogs, did you call click_no_wait before your method. There are a variety of ways to deal with dialog boxes, all have been posted, so search for it if that doesn't work. Post your solution if it does work. Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Wed, Jul 29, 2009 at 2:26 PM, ghidu agh...@gmail.com wrote: Hello, Sorry for the previous message, the finger slipped onver SPACE :) I cannot open a modal dialog and return from it. This is waht I do: Thread.abort_on_exception = true t = Thread.new { button.fire_event(onmousedown) } t.kill It never reaches t. Firing the event onmouse down on button opens the modal dialog. How can I get it to work? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed
click_no_wait doesn't work, only onmousedown opens the modal dialog. Is there a no_wait for fire_event? Thanks On Wed, Jul 29, 2009 at 11:32 PM, Charley Baker charley.ba...@gmail.comwrote: There are so many definitions around modal dialogs, did you call click_no_wait before your method. There are a variety of ways to deal with dialog boxes, all have been posted, so search for it if that doesn't work. Post your solution if it does work. Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Wed, Jul 29, 2009 at 2:26 PM, ghidu agh...@gmail.com wrote: Hello, Sorry for the previous message, the finger slipped onver SPACE :) I cannot open a modal dialog and return from it. This is waht I do: Thread.abort_on_exception = true t = Thread.new { button.fire_event(onmousedown) } t.kill It never reaches t. Firing the event onmouse down on button opens the modal dialog. How can I get it to work? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---