[wtr-general] Opening an Excel file with a variable name
All, I am attempting to open an Excel file with Ruby, and have run into a problem. If I open the file with single quotes, like inputFile = input.Workbooks.Open('C:\Folder\sheet.xls') everything works fine. My problem now is that the location of the .xls file has a variable name, like inputFile = input.Workbooks.Open(C:\#{var)\sheet.xls). When I try this, I get an error saying that the file cannot be found. It seems that the 'open' method will only work with single quotes, but to signify a variable in a string in Ruby you have to use double quotes. Has anyone discovered a way around this? Thanks in advance for any help. - Shelton --~--~-~--~~~---~--~~ 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: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Accessing an application's registry keys with Ruby
All, Has anyone discovered a way of accessing an application's registry keys with Ruby? I am attempting to access the registry key of the application under test at runtime of my automated script, so that I can get the build number of the app from the registry. Thanks in advance for any help. - Shelton --~--~-~--~~~---~--~~ 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: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Excel Ranges and Ruby
All, I am trying to enter the contents of an array into an excel range. Here is a sample of what I am doing now: array = (0,1,2) excel.Range(A1::A3) = array When I do this cells a1, a2, and a3 are all set to 0, and not 0,1,2 as I am expecting. Can someone please assist me with this? I can elaborate if necessary. Thanks in advance. Shelton --~--~-~--~~~---~--~~ 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: 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 -~--~~~~--~~--~--~---
[wtr-general] Directory Comparison
All, I am attempting to compare two file directories, both containing .xml files. If a filename is present in both directories, I want to compare the two files, looking for any differences. If a filename is only present in one of the directories, I want to send the filename to a file that contains a list of the files only found in one of the directories. Does anyone know of a good way of comparing the contents of a directory with Ruby? Thank you in advance for your help. - Shelton --~--~-~--~~~---~--~~ 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: 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 -~--~~~~--~~--~--~---
[wtr-general] Ruby While Loop
All, I currently have a while loop that iterates as long as the cell it is checking an Excel is not nil. I want to add a if statement in this while loop that, if the 'if' condition is met, will add 1 to the loop iterator, and restart the while loop, without executing the rest of the code in the while loop. Here is my code below: while(input.Range(b#{x})['Value'] != nil) if(input.Range(a#{x})['Value'] == 'no') x +=1 end Can someone please tell how to increment x and restart the while loop, without executing the rest of the code in the while first? I can elaborate if this is not clear. Thanks in advance for all of your assistance. - Shelton --~--~-~--~~~---~--~~ 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: 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 -~--~~~~--~~--~--~---