I am robot framework in pycharm. I want to connect to db(mysql) and perform different operations like delete.
I am using below code but getting couple of errors;
*** Settings ***
Library DatabaseLibrary
Library OperatingSystem
Library Collections
*** Variables ***
${DB_DRIVER} org.hsqldb.jdbcDriver
${DB_URL} jdbc:hsqldb:mem:qadb
${DB_USER} test
${DB_PASSWORD}
${DB_HOST} amazonaws.com
${DB_Port} 8888
${DB_Name} qadb
${DB_API_MODULE_NAME} mysql-connector-python
*** Keywords ***
Database Testing
Connect To Database dbapiModuleName=${DB_API_MODULE_NAME} dbName=${DB_Name} dbUsername=${DB_USER} dbPassword=${DB_PASSWORD} dbHost=${DB_HOST} dbPort=${DB_PORT}
*** Test Cases ***
DBTest
Run Database Testing
${result} = Query SELECT * FROM your_table
Log Many ${result}
1. ModuleNotFoundError: No module named ‘mysql-connector-python’
2. ValueError: No database connection is open.
I have already installed mysql-connector-python.
Please suggest, Thanks!