Hi
Jim,
I
faced the same problem, logically we would put the startClicker after pop up has
been issued, but for the startClicker to function it is to be called before the
pop up is fired
Internally startClicker calls
clickJSDialog.rb, startClicker is present in popups_test.rb (not in
winclicker)
So try
calling the startClicker before you click on Delete like:
require "watir"
include Watir
def
startClicker( button , waitTime =
3)
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} "
puts "Starting #{c}"
w.winsystem(c )
w=nil
end
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} "
puts "Starting #{c}"
w.winsystem(c )
w=nil
end
$ie =
Watir::IE.new
$ie.goto(".........")
$ie.goto(".........")
startClicker("OK")
$ie.link(:text,"Delete").click
puts "111111111"
Also wait for
some time to find out if the pop up is getting closed or not,
I hope this
helps you to solve the issue.
Guys, correct me
in case I am wrong
Jamuna
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of jim
che
Sent: Wednesday, September 21, 2005 9:03 AM
To: [email protected]
Subject: Re: [Wtr-general] Help, how to click the button of the windows th at poped up by _javascript_?
Sent: Wednesday, September 21, 2005 9:03 AM
To: [email protected]
Subject: Re: [Wtr-general] Help, how to click the button of the windows th at poped up by _javascript_?
Hi Jamuna
Thank you for your help
The problem still exist.
I found that all the codes were paused to execute when
the small window poped up.
For example
ie.link(:text,"Delete").click
puts "111111111"
After click the link "Delete",I found the small window poped up
and the system didn't print the info "11111111" after I click the button "ok" on
the samll window then I saw the system print out the "11111111".
So It means that if the samll window poped up and not closed
manually the ruby code below will not be executed.
Does anyone meet this problem?
Any advice is appreciated
jim
_________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Jamuna,
Nithyanandam (IE10)
Sent: Tuesday, September 20, 2005 3:49 AM
To: [email protected]
Subject: Re: [Wtr-general] Help,how to click the button of the windows
th at poped up by _javascript_?
Hi Jim,
a) Include the definition! of startClicker (available in winClicker.rb)
def startClicker( button , waitTime = 0)
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb
#{button
} #{ waitTime} "
puts "Starting #{c}"
w.winsystem(c )
w=nil
end
b) Before you click on delete call startClicker, say startClicker("OK")
c) Call the button click for Delete
Hope this helps you, all the best
Regards,
Jamuna Nithyanandam
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Jamuna,
Nithyanandam (IE10)
Sent: Tuesday, September 20, 2005 3:49 AM
To: [email protected]
Subject: Re: [Wtr-general] Help,how to click the button of the windows
th at poped up by _javascript_?
Hi Jim,
a) Include the definition! of startClicker (available in winClicker.rb)
def startClicker( button , waitTime = 0)
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb
#{button
} #{ waitTime} "
puts "Starting #{c}"
w.winsystem(c )
w=nil
end
b) Before you click on delete call startClicker, say startClicker("OK")
c) Call the button click for Delete
Hope this helps you, all the best
Regards,
Jamuna Nithyanandam
________________________________
__________________________________________________
Do You Yahoo!?
Tired
of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
