Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

watir and ruby for web based application testing

25 views
Skip to first unread message

cjd...@gmail.com

unread,
Jun 15, 2012, 1:38:46 AM6/15/12
to
i am new in watir and ruby and i need to test a web based application with a use of excel wherein all the inputs are stored there. theres a registration form in the application and all the inputs in the given fields are in an excel file. what will my code be like?

my code here is not working. i also use notepad++ for coding and command prompt to run the program

require 'watir-webdriver'
require 'parseexcel'

browser = Watir::Browser.new :chrome
browser.goto 'website'
browser.button(:name => 'ctl00$ContentPlaceHolder1$btnRegister').click

workbook = Spreadsheet::ParseExcel.parse(ARGV[0])

worksheet = workbook.worksheet(0)

worksheet.each { |row|
i=0
j=0
if row != nil
row.each { |cell|
if cell != nil
contents = cell.to_s('latin1')
puts "Row: #{j} Cell: #{i} #{contents}"
end
#i = i+1

}
j = j +1
end
}


hope you could help me... thanks! :)
0 new messages