[wtr-general] Re: Watir fire_event that opens a modal dialog no wait needed

2009-08-26 Thread Adrian Ghidu
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

2009-08-25 Thread Adrian Ghidu
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

2009-08-25 Thread Adrian Ghidu
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

2009-07-29 Thread Adrian Ghidu
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
-~--~~~~--~~--~--~---



[wtr-general] Re: Java port for Watir

2009-07-27 Thread Adrian Ghidu
Manish, I've tried watij and it has a serious problem with the tables in my
web application. I need a utility for java.

On Mon, Jul 27, 2009 at 7:54 AM, Manish Sapariya man...@gslab.com wrote:


 to be technically correct, celerity itself is not headless browser,
 but watir api driving headless browser 'htmlunit'.

 -Manish

 Manish Sapariya wrote:
  Did you try watij
  http://watij.com/
 
  I don't have first hand experience but its java port of watir.
 
  Another thing you can try out is celerity, which is headless
  browser.
 
  http://celerity.rubyforge.org/
 
  -Manish
 
  ghidu wrote:
  After trying few web testing tools I've decided to stick with watir.
  The only problem is I've already have an application written in java
  and I want to incorporate watir into it. I tried using jruby, but I
  keep getting 'no such file to load - watir'.
  Watij doesn't work with the table rows in the web application, but
  watir does. Any advice?
  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
-~--~~~~--~~--~--~---