Shok,

I'm sorry my example wouldn't work for you directly; I copied / pasted it out 
of some of my code, which does work, so I'm unsure why. Even though you are 
shelving it for a while, here is some more complete code of how my Excel test 
automation output works:

(This automation actually doesn't perform any tests, but is generates test data 
through the UI). This reads data from an Input spreadsheet and creates a new 
Output spreadsheet. The Output section may be useful for you someday. Let me 
know if you have any questions:

class ProprietaryApp

@@ExcelInput      = nil     # Excel input spreadsheet
@@ExcelObjectData = nil     # how to map/ID web page objects
@@ExcelAutoData   = nil     # test claims generation parameters
@@ExcelOutput     = nil     # Excel output spreadsheet
@@ExcelConfigData = nil     # general auomation configuration settings

@@ThisFilePath    =  File.expand_path( File.dirname( __FILE__ ) ) + "/"
@@InputFileName   = "InputData.xls"
@@OutputFileName  = "OutputData.xls"

attr_accessor :ie                
attr_accessor :url               
attr_accessor :currentInputLine  

def initialize( url = nil )
if @@ExcelInput == nil
IntelliSet.initInput()
end

if @@ExcelOutput == nil
IntelliSet.initOutput()
end

@currentInputLine = 5
init_browser( url )
end

def ProprietaryApp.initInput()
@@ExcelInput = WIN32OLE::new( "Excel.Application" )
@@ExcelInput.visible = true
@@ExcelInput.Workbooks.Open( @@ThisFilePath + @@InputFileName )

@@ExcelAutoData   = @@ExcelInput.Workbooks( 1 ).Worksheets( 1 )
@@ExcelObjectData = @@ExcelInput.Workbooks( 1 ).Worksheets( 2 )
@@ExcelConfigData = @@ExcelInput.Workbooks( 1 ).Worksheets( 3 )
end

def ProprietaryApp.initOutput()
@@ExcelOutput = WIN32OLE::new( "Excel.Application" )
@@ExcelOutput.visible = true
@@ExcelOutput.Workbooks.Add()
@@ExcelOutput.Workbooks( 1 ).Worksheets( 1 ).name = "ProprietaryApp Output"
@@ExcelOutput.Workbooks( 1 ).Worksheets( 3 ).delete()
@@ExcelOutput.Workbooks( 1 ).Worksheets( 2 ).delete()
@@ExcelOutput.Application.DisplayAlerts = false

@@ExcelOutput.Range( "A1" ).value                  = "ProprietaryApp Automation 
Results"
@@ExcelOutput.Range( "A1" ).Font.Name              = "Arial Black"
@@ExcelOutput.Range( "F2" ).value                  = "Claimed Equipment"
@@ExcelOutput.Range( "A3:N3" ).Interior.ColorIndex = 1
@@ExcelOutput.Range( "A3:N3" ).Font.ColorIndex     = 2
@@ExcelOutput.Range( "A3:N3" ).Font.Bold           = true
@@ExcelOutput.Range( "A3:N3" ).value               = [ 
"Profile","Client","SecretCol1","SecretCol2","SecretCol3","Make","Model","SecretCol4","SecretCol5","SecretCol6","MOP","Deductible
 Amount","Additional Fees","Execution Time" ]
#                                                     A         B        C      
    D         E     F      G       H            I                  J          K 
    L                   M                 N
$emptyRow = 4
end
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18406#18406
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to