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