How to capture row value in excel and display with puts in Ruby?

Viewed 23

This code reads the value from the worksheet and checks the value on the front-end. If the value is different, how do I display a message with the differences in the X Front worksheet?

 Spreadsheet.client_encoding = 'UTF-8'
  book = Spreadsheet.open('c:/temp/gab_full.xls', "r")
  sheet = book.worksheet 0
  xls_offset = 1
  row_offset = 2
  sheet.each_with_index(xls_offset) do |row, idx|
   expected_tooltip = row[1]
  break if row[1].nil?
   expect(page).to have_css("tr.tvRow:nth-child(#{row_offset+idx}) .tvCell:nth-child(6) img[tooltip='#{expected_tooltip}']")
  end

For example: puts The worksheet value in row xxx is "mandatory" and in front end is "invisible"

0 Answers
Related