A
Amit
Hi,
I have the following code but the problem here is that I am not able
to move forward to next page which appear after clicking on "OK"
button of Java Script pop up.
HTML is as follows:
I save this file in C: drive as test.html
<html> <head> <script type="text/javascript"> function disp_alert()
{ alert("I am an alert box!!"); } </script> <title> Jagdeep </title>
</
head>
<body> <a href= "http://www.google.com" onclick="disp_alert()" />
Click Here </a> </body>
</html>
Watir Script is as follows:
require 'watir'
require 'watir/ie'
require 'watir/contrib/enabled_popup'
#require 'win32ole'
def startClicker( button , waitTime = 10)
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('C:/test.html/')
startClicker("OK")
$ie.link
text, 'Click Here').click_no_wait
Here is the code which does not shows any exception but it is also not
moving forward
Anyone please help here.
Thanks,
Amit
I have the following code but the problem here is that I am not able
to move forward to next page which appear after clicking on "OK"
button of Java Script pop up.
HTML is as follows:
I save this file in C: drive as test.html
<html> <head> <script type="text/javascript"> function disp_alert()
{ alert("I am an alert box!!"); } </script> <title> Jagdeep </title>
</
head>
<body> <a href= "http://www.google.com" onclick="disp_alert()" />
Click Here </a> </body>
</html>
Watir Script is as follows:
require 'watir'
require 'watir/ie'
require 'watir/contrib/enabled_popup'
#require 'win32ole'
def startClicker( button , waitTime = 10)
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('C:/test.html/')
startClicker("OK")
$ie.link
Here is the code which does not shows any exception but it is also not
moving forward
Anyone please help here.
Thanks,
Amit