MYSQL DataBase testing using Selenium WebDriver-Step by Step Guide:

MYSQL DataBase testing using Selenium WebDriver-Step by Step Guide:

Refer to the below Links for Practise
Selenium Wiki
Complete List of Selenium Basics
50 Real Time Interview Questions
Real Time Scenario’s
Java Platform Standard Edition 8 Documentation
Complete List of Java Basics
Java Quiz
Java OOPS Quiz
Selenium Advanced Quiz
Selenium Quiz

  1. Introduction
    SQL Part of “MYSQL” stands for Structured Query Language. MYSQL is a relational database from oracle where data is stored in tables.
    MYSQL is open source and it is very fast, reliable and easy to use. MYSQL works in a client/server architecture.
  2. Download
    To Download the MYSQL please access the following URL->https://dev.mysql.com/downloads/installer/.
    Select the Windows (x86, 32-bit) MSI Installer to download the software.


  3. Double click on the software to open the installer.
    Note:: If you are getting any error as shown below while launching MYSQL Software please download the .NET Framework from this link->https://www.microsoft.com/en-us/download/confirmation.aspx?id=42642
  4. Click on Finish and Restart the System to reflect the changes.
  5. Accept the License agreement and Click on Next.
  6. Select the Setup Type as Custom and click on Next.
  7. Select the products MYSQL Server and SQL Workbench and click on Next to download.
  8. Check Requirements dialog shows the failing requirements.
  9. Note:: Download the Microsoft Visual C++ from this link ->https://www.microsoft.com/en-in/download/details.aspx?id=40784.
    Once the Microsoft Visual C++ setup is successful reopen the installer from the beginning to continue the process of installtation.

  10. MY SQL Server and Workbench is ready to be installed. Click on Execute to continue.
  11. Continue with default values and click on Next.
  12. Provide the username and password.
  13. Deselect the option to start the MYSQL Server during System Startup.
  14. Click on Finish to complete installation.
  15. Start the MYSQL Server from the System by accessing ‘services.msc’ from the Start Menu. Select the MYSQL service and click on Start button to start the server.
  16. Open MYSQL Command line Client from Start Menu. Execute the following Commands:
    • Create Database testDB
    • show databases
    • use testdb
    • show tables
    • create table employee (name VARCHAR(20),salary INTEGER);
    • INSERT into employee values (‘JOHN’,25000);

  17. Create a Maven Project add the mysql-connector.jar as an dependency for the project.
  18. This jar file contains “com.mysql.jdbc.Driver” class it must be present in Build path of the project
    in order to successful connection to mysql database.Copy the Maven Dependencies information from the
    Repository URL mentioned below: https://mvnrepository.com/artifact/mysql/mysql-connector-java/5.1.21
    Dependency Infromation:

  19. Execute the following code to retrieve the data from Database ‘testDB’.
  20. Please find the console ouput::

1 comment on “MYSQL DataBase testing using Selenium WebDriver-Step by Step Guide:

Leave a Reply

Your email address will not be published. Required fields are marked *