I have managed to import the ExcelRobot
library into Ride and everything look normal since the name didnt got in red.
When I go to the Test Case and call the keyword Open Excel
, it shows the keyword is available.
However, when I ran the Test Case, I got the error Importing test library 'ExcelRobot' failed: ImportError: No module named ExcelRobot
What can be wrong?
I'm not sure about the library that you are going to use. But I have used "ExcelLibrary" in my test suite and its perfectly working.
Example code:
*** Settings ***
Library ExcelLibrary
Library String
*** Variables ***
${ExcelLocation} ExcelTestNumbers.xls
${ExcelOutputLocation} ExcelTestNumbersOutput.xls
${ExcelSheetName} Sheet1
*** Test Cases ***
NumberRotation
NumberRotation
*** Keywords ***
NumberRotation
ExcelLibrary.Open Excel ${ExcelLocation}
${ExcelRowCount} ExcelLibrary.Get Row Count ${ExcelSheetName}
Log to console Excel_Row_Count_${ExcelRowCount}
: FOR ${LoopCycle} IN RANGE ${ExcelRowCount}
\ Log to console Loop_Rotation_${LoopCycle}
\ ${CurrentProcessingNumber}= ExcelLibrary.Read Cell Data By Coordinates ${ExcelSheetName} 0 ${LoopCycle}
\ Log to console CurrentProcessingNumber_${CurrentProcessingNumber}
\ ExcelLibrary.Put String to Cell ${ExcelSheetName} 1 ${LoopCycle} ExcelSave${LoopCycle}
\ Save Excel ${ExcelOutputLocation}
\ Log to console Saved
\ ... ELSE NumberInvalid
ExcelLibrary Keywords: http://navinet.github.io/robotframework-excellibrary/ExcelLibrary-KeywordDocumentation.html
Hope this helps.
cheers.