Hi Experts,

I put my Test scripts, test data excel files and test cases file in
one folder and doing testing. When i change the whole bunch to another
system i am facing folder path issues. I was working QTP , where i can
solve this problem by relative path. Please take a look on my below

$excel_path = "e:\\Data\\Prince\\WatIR\\iComet\\TestCases\
$excel = WIN32OLE.new("excel.application")
$excel['Visible'] = true;
$workbook = $excel.Workbooks.Open $excel_path
$worksheet = $workbook.WorkSheets(4)

So after searching rdoc i found one code and it returns the current
path. But am unable to open the excel file.

$excel_path = Dir.getwid + "\\Stores&Spares"

it gives the current file path as below


So my tests are failed. I  need something like below

$excel_path = RelativePath+(\\Stores&Spares)

It may not be a watir question but i dont have more experience in
ruby. So please help me to solve this issue.



You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to