hi
u can use this code..
def start_jsalert_clicker
Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") }
#please specify ur path of jscriptExtraAlert
end
u have to change ur windowhelper.rb file as...
def push_alert_button
@autoit.WinWait "Window Internet Explorer", ""
text = @autoit.WinGetText "Window Internet Explorer"
file = File.open("c:\\test.txt", "w")
file.puts text
puts text.to_s
file.close
@autoit.Send "{ENTER}"
end
after then u can read content of these file......ok...
Regards
Shalini Gupta
On 5/9/07, gary <[EMAIL PROTECTED]> wrote:
Thanks for the prompt reply.
I added the code but it appears to return a value of 'Google', any ideas?
require 'watir' # the controller
include Watir
require 'watir/WindowHelper'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'dl/win32'
require 'watir/winClicker'
class TC_recorded < Test::Unit::TestCase
def startClicker( button , waitTime = 3)
w = WinClicker.new
longName = @IE0.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start ruby #{shortName }\\watir\\clickJSDialog.rb #{button }
#{waitTime} "
puts "Starting #{c}"
w.winsystem(c)
w=nil
end
def test_1
@IE0 = IE.new
@IE0.set_fast_speed
@IE0.goto("www.hmv.co.uk")
@IE0.link(:text, "Sign In").click
w = WinClicker.new
text = w.get_static_text('Windows Internet Explorer') # returns an array
for each static control
text.each {|t| puts t}
startClicker("OK" , 3)
@IE0.image(:alt, "continue").click
@IE0.close
end
end
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general