Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > handling java script popups(onclick)

Reply
Thread Tools

handling java script popups(onclick)

 
 
Phani C.
Guest
Posts: n/a
 
      10-14-2010
hello every one,
I have a problem while "handling popups".
It is like
1)In my application after a button click a popup is expected and then I
have to handle that popup.
2)I have written popup handler in seperate thread(using autoit).
3)But when I issue a button click my script is hanging at that point and
its not allowing any other thread to execute .
*) I also used click_no_wait but I found it's not even clicking the
button its going for the next statement

I am using

ruby version
------------
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]

gem version
------------
1.3.7

I also tried it in ruby version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Please give some solution .
I think I am missing some thing or there may be problem with ruby
versions.
I am stucked here ,please help me.
/Phani

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Roger Pack
Guest
Posts: n/a
 
      10-14-2010
Phani C. wrote in post #950098:
> hello every one,
> I have a problem while "handling popups".
> It is like
> 1)In my application after a button click a popup is expected and then I
> have to handle that popup.
> 2)I have written popup handler in seperate thread(using autoit).


Do you start this thread before issuing the click?

Anyway my first hunch is to use jruby since it has "real" threads (or
maybe 1.9.x...).
-r

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Kevin D.
Guest
Posts: n/a
 
      10-14-2010
The best thing I have found is to start a popup handler script in a sub
process.

popupHandler =
Kernel.open("|\"#{RbConfig::CONFIG["bindir"]}/#{RbConfig::CONFIG["ruby_install_name"]}.exe\"
\"PopupHandler.rb\" #{$$} \"#{@@browserType}\" \"#{@@baseUrlAddress}\"
\"#{@@ieVersion}\" \"#{@@ffVersion}\"", "wb")

the file attached is the popup handler script.

I Use this with watir/firewatir

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Phani C.
Guest
Posts: n/a
 
      10-19-2010
Hi Roger,
Yes I have started popup handler thread before "click".I have seen that
popup handler handling other normal popups(other than on-click popups).I
think it's not thread problem.
hanging after button click is expected but I have to use click_no_wait
to make it work so that it doesn't hang.But click_no_wait is not
working.
I am attaching my code please find it.
/Phani.

Attachments:
http://www.ruby-forum.com/attachment/5225/vlan_add.rb


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Phani C.
Guest
Posts: n/a
 
      10-19-2010
Hi Kevin,
I have been using popup handler in a thread( which is almost equal
starting in separate process).Please find my code in the attachment.
/Phani

Attachments:
http://www.ruby-forum.com/attachment/5226/vlan_add.rb


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a script from another script and other script does notdo busy wait. Rajat Python 3 01-08-2010 02:05 PM
RE: How to execute a script from another script and other script doesnotdo busy wait. VYAS ASHISH M-NTB837 Python 2 01-07-2010 08:18 PM
Handling Mouse Wheel through Java Script Weasley Javascript 3 12-12-2009 05:40 PM
Handling Mouse Wheel through Java Script Weasley Java 1 12-12-2009 03:08 AM
python list handling and Lisp list handling Mark Tarver Python 22 04-26-2009 09:36 PM



Advertisments