Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Unable to handle a browser window

Thread Tools

Unable to handle a browser window

Pranjal Jain
Posts: n/a
In one web site when i am clicking on the page, a new browser window
is opening. But I cannot handle the window (i.e) I cannot the perform
the operations like writing the data in it; clicking on the "Save
Comments" button & closing the window.

I had written the code also:

require 'rubygems'
require 'watir/watir_simple.rb'
require 'test/unit'
require 'watir'
include Watir

require 'database'
# User defined library
require 'popup'
b = 0
$ie =
$ie.text_field(:name,'{actionForm.username}').set( $username[b].to_s)
$ie.text_field(:name,'{actionForm.password}').set( $password[b].to_s)
$ie.button(:name, '').click

if($,"javascriptpenWin('callComment esting
Practice&displayDate=Mon, 05-May-08 - Sun, 11-May-08( Week Number 19
)&userName=Pranjal.Jain&index=0&comments=','winAme nd',500,250)").exists?)
$,"javascriptpenWin('callCommentAct ing
Practice&displayDate=Mon, 05-May-08 - Sun, 11-May-08( Week Number 19
)&','winAmend',5 00,250)").click

startClicker( "Save Comments", 15 , "Hello") # function from popup
script is cld
puts "Sorry"

Here "startClicker" is the standard pop up handler function

Please suggest
Thanks in advance


Posted via

Reply With Quote

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
Possible to handle web requests without an ASPX page? i.e. have DLL handle request. ASP .Net 2 05-31-2005 05:42 PM
Open new window in codebehind and add the window handle to javascript array RJN ASP .Net 1 10-10-2004 07:53 PM
Get window handle by window name RJN ASP .Net 0 10-10-2004 02:00 PM
make a browser window stay on top window handle? =?Utf-8?B?RHVzdGluIElJLg==?= ASP .Net 1 08-18-2004 06:26 AM
File Handle Reading Blues: Rereading a File Handle for Input Dietrich Perl 1 07-22-2004 10:02 AM