Hi,
I am tried to connect the Microsoft SQL server management Studio" database in Robot framework and port value is not picked correctly in variable in Robot Framework.
Note: with same value database connection is working correctly in .py file.
Please find attached screen shot for this.
here is the code:
*** Settings ***
Library DatabaseLibrary
Library OperatingSystem
Library SeleniumLibrary
*** Variables ***
${DbDriver} ODBC Driver 17 for SQL Server
${DbServer} server name
${dbName} dbname
${dbUsername} user name
${dbPassword} Testpassword
${dbPort} 1433
${DbAuthentication} ActiveDirectoryInteractive
*** Test Cases ***
Verify the sql Connection
set log level TRACE
When Verfy by the database connection
*** Keywords ***
Verfy by samta the database connection
Connect to Database pymysql ${DbDriver} ${DbServer} ${dbName} ${dbUsername} ${dbPassword} ${DbAuthentication} ${dbPort}
Here is the error:
(venv) PS C:\Users\Samta\PycharmProjects\SDHUI_RobotFramework_TestAutomation> Robot -d Results --variable var:chrome Testsuite\Samta_Execution\02_Request_Approval
02 Request Approval
02 Request Approval.DBTrail
Verify the sql Connection | FAIL |
ValueError: Argument ‘dbPort’ got value that cannot be converted to integer or None.
02 Request Approval.DBTrail | FAIL |
1 test, 0 passed, 1 failed
02 Request Approval | FAIL |
1 test, 0 passed, 1 failed
Log: C:\Users\Samta\PycharmProjects\SDHUI_RobotFramework_TestAutomation\Results\log.html
Report: C:\Users\Samta\PycharmProjects\SDHUI_RobotFramework_TestAutomation\Results\report.html
(venv) PS C:\Users\Samta\PycharmProjects\SDHUI_RobotFramework_TestAutomation>
Please advise me to fix this issue.