I am using datadriven library in robotframework the windows excel, the file format of .xlsx. I’ve two sheets in it, but when, I call the .xlsx file and with the sheet name, it not fetching file and sheet name
Test Script:
*** Settings ***
Library DataDriver file=C:\Users\u421643\AppData\Roaming\JetBrains\Aqua2024.3\extensions\com.intellij.database\ROBOT_FRAMEWORK\datadriven.xlsx
… sheet_name=Sheet1
Test Template Test Case Keyword 1
*** Keywords ***
Test Case Keyword 1
[Arguments] ${username} ${password}
Log ${username}
Log ${password}
*** Test Cases ***
The Test Execution ${username} ${password}
[Tags] data_driven
Data sheet:
For Sheet 1:
*** Test Cases *** | ${username} | ${password} | [Tags] | [Documentation] |
---|---|---|---|---|
Right user empty pass | demo | ${EMPTY} | 1 | This is a test case documentation of the first one. |
Right user wrong pass | demo | FooBar | 2,3,foo | This test case has the Tags 2,3 and foo assigned. |
${EMPTY} | mode | 1,2,3,4 | This test case has a generated name based on template name. | |
${EMPTY} | ${EMPTY} | |||
${EMPTY} | FooBar | |||
FooBar | mode | |||
FooBar | ${EMPTY} | |||
FooBar | FooBar |
sheet 2:
*** Test Cases *** | ${username} | ${password} | [Tags] | [Documentation] |
---|---|---|---|---|
Test 2-sheet | 1 | 2 | 3 | 4 |
the execution report
[ ERROR ] Calling method ‘_start_suite’ of listener ‘DataDriver’ failed: ImportError: Requirements (pandas, openpyxl) for XLSX support are not installed.
Use ‘pip install -U robotframework-datadriver[XLS]’ to install XLSX support.