It is not working yet, i have tried all the given below methods in
code:
**********************************
require 'rubygems'
require 'watir'
require 'win32ole'
ie = Watir::IE.new
ie.goto('
http://qa2.mlb.com/enterworkflow.do?
flowId=sb_purchase&brand=cle_scoreboard&wfClub=cle')
puts "Security Alert must be in the way. Click to bypass"
autoit.WinActivate( "Security Alert", "")
autoit.Send( "(TAB)")
autoit.Send( "(TAB)")
autoit.Send( "(Enter)")
autoit.ControlClick("Microsoft Internet Explorer",'', 'OK')
autoit.ControlClick("Security Information",'', '&Yes')
autoit.ControlClick("Security Alert",'', '&Yes')
sleep(5)
**********************************
#------------------------------------------------------------------------------------------------------------
#
#includes
require 'watir' # the controller
require 'win32ole'
# set a variable
test_site = '
http://qa2.mlb.com/enterworkflow.do?
flowId=sb_purchase&brand=cle_scoreboard&wfClub=cle'
# open the IE browser
ie = Watir::IE.new
# print some comments
puts "## Beginning of test: Form Submission"
puts " "
puts "Step 1: go to the test site: " + test_site
a = Thread.new {
ie.goto(test_site)
}
ie.send_keys('{TAB}')
ie.send_keys('{TAB}')
ie.send_keys('{ENTER}')
a.join
puts " Action: entered " + test_site + " in the address bar."
puts " "
puts "Step 2: enter '
dheeraj...@tavant.com' in the
emailAddress text field"
ie.text_field(:name, "emailAddress").set
("
dheeraj...@tavant.com")
puts " Action: entered
dheeraj...@tavant.com in the
emailAddress field"
puts " "
puts "Step 3: enter 'dheeraj' in the password text field"
ie.text_field(:name, "password").set("dheeraj")
puts " Action: entered dheeraj in the password field"
puts " "
puts "Step 4: click the 'Login' button"
ie.button(:value, "Login").click
puts " Action: clicked the Login button."
if ie.contains_text("September")
puts "Test Passed. Found the test string: 'September'. Actual
Results match Expected Results."
else
puts "Test Failed! Could not find: 'September'"
end
puts " "
ie.link(:text, "September").click
***************************************
On Jul 20, 2:46 pm, Željko Filipin <
zeljko.fili...@wa-research.ch>
wrote:
> On Mon, Jul 20, 2009 at 11:34 AM, Dheeraj Gambhir <
>