Hi,
I have installed the ruby 1.8.6 and WATIR 1.6.2.
I have created a script which fetches the data from excel sheet & perform
the operations.
Then I have kept the following code in a common file inside 'Library'
directory which gets data from excel sheet.
----------------------------
require 'Xls' # Xls.rb is in the same directory(Library)
# This function is used to fetch the data from excelsheet.
def getdata()
xlFile = XLS.new(Dir.pwd + '../Test-Data/Data.xls') #grab the data file
mydata = xlFile.getRowRecords('Test Data','Sheet1') #pull data records
from excel
return mydata
xlFile.close
end
----------------------------
All the functions related to excel operations are kept Xls.rb file which is
in same directory.Then I am calling the function getdata() from another file
from parent directory as below.
----------------------------------------
require 'test/unit'
require 'Library/common'
require 'watir'
Watir.options_file = 'E:/Data316/RSC-ePlatform/Automation/options.yml'
class Gmail < Test::Unit::TestCase
def test_Gmail_Working
# Calling getdata function
@myData = getdata()
end
end
------------------------------------
But when I ran the above script I got following error.
----------------------------------------
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no
such file to load -- Xls (LoadError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from ./Library/common.rb:5
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
'gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from ESR6.rb:7
---------------------------------------
Please help me on the above issue.
Thanks & Regards
Durgesh.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---