Hey Kanika, Selenium Webdriver is limited to Testing Browser Application. To use Selenium Webdriver for Database Verification you need to use the JDBC ("Java Database Connectivity"). JDBC (Java Database Connectivity) is a SQL level API that allows you to execute SQL statements. It is responsible for the connectivity between the Java and a wide range of databases. The JDBC API provides the following classes and interfaces:
- Driver Manager
- Driver
- Connection
- Statement
- ResultSet
- SQLException
In order to test your Database using Selenium, you need to follow 3 steps:
- Make Connection to Database
- Send Queries to DB
- Process the Results