watir and ruby for web based application testing

C

cjdgmed

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 anexcel 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! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top