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.buttonname => 'ctl00$ContentPlaceHolder1$btnRegister').click
workbook = Spreadsheet:arseExcel.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!
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.buttonname => 'ctl00$ContentPlaceHolder1$btnRegister').click
workbook = Spreadsheet:arseExcel.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!