Hi Babu,
Write a method First. And call it from next line
But in your case calling the method before defining it.
It Should be
def setup (iebro,val)
iebro.goto xlsheet.Range('C'"#val").value
end
setup(browser2,$i)
Thanks
On Tue, Oct 18, 2011 at 1:58 AM, Babu wrote:
> hi,
> require
hi,
require 'rubygems'
require 'watir-webdriver'
require 'win32ole'
xl = WIN32OLE.new('Excel.Application')
xl.visible = true
xlbook = xl.workbooks.open('C:\Suvo\ControlFile.xls')
xlsheet = xlbook.worksheets(1)
xlsheet.Select
count = xlsheet.Range('A1').currentRegion.Rows.count
$i = 2;
$num = count;