Database Verification Using Selenium Webdriver

Main usage of database In selenium WebDriver Is getting records from table and use them In your selenium test as per your requirement. Simple example Is you can use that data to perform data driven testing or you can verify data In tables which you have Inserted through web application
forms. Now supposing you wants to update data

Selenium Webdriver Chrome

directly In

How to do the Database Testing using Selenium WebDriver. As we are aware that WebDriver API is only good to test a web application using various web browsers, therefore, in order to include database testing i.e. Storing or retrieving test data from the database we need to use the JDBC Connection. We cannot perform database testing using selenium webdriver but we can use language (java/python.) APIs to automate the database in selenium. Selenium does not provide any utility to do database testing, You will have to utilize feature available in the programming language. When using Selenium to automate UI testing, we need to make sure any user data entered from the UI should be captured in the database. We can use database retrieve statement to retrieve data and then use the data to verify what is entered by the user. Considering the example of a user registration.

Then we shall use the text function to create a customized xpath. The findElements method returns a list of elements. We shall use the size method to verify if list size is greater than 0. Suppose we want to verify if the below text exists in the page. Code Implementation with findElements.

MySql data table and then you wants to verify same thing In UI then you can do It very easily.
Firefox
Note : Please read all previous posts on database testing. Links are listed on THIS PAGE.
Database Verification Using Selenium Webdriver
Updating specific data cell In MySql database table
In my previous post, We learnt how to select specific record using PreparedStatement Interface. Now we will use executeUpdate() method to update specific record which Is selected by where clause.
Bellow given example will set name = 'Danial' where id = 5 In user table. Main thing to learn In this example Is how to write query string and set Its parameters to update specific record. Execute bellow given example In eclipse.
DOWNLOAD UpdateRecordInDB.zip folder. You will get UpdateRecordInDB.java test script file In zip folder when extract It. Import It In your eclipse and then execute
At the end of execution, It will show you databse table records In console as shown In above Image. You can see In Image that records with id = 5 Is updated with name = 'Danial'. Now If you have website UI then you can check same thing there using selenium webdriver.

<< PREVIOUS || NEXT >>
Hi All,
I want to do database testing using selenium webdriver. here i have small doubt after geting database ResultSet data
how to verify on user interface content.
for example:-
I am getting ResultSet data from Student table by using jdbc code.this data can be displayed on userinterface table likeUsing
Students Details:-
Sno sname address
1 mahi HYD
2 subbu KNL
3 madhu Guntur
Here i want to do verify Student ResultSet data with UserInterface StudentDetails content.
Here i want to examine this data is coming from database or not.

Database Validation Using Selenium Webdriver


This is my urgent requirement. i am waiting for your response.

Database Verification Using Selenium Webdriver Maven

Thanks,
Malappa.
--
You received this message because you are subscribed to the Google Groups 'webdriver' group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.

Selenium Webdriver Api

To post to this group, send email to webdriver@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver?hl=en.

Selenium Webdriver Firefox

For more options, visit https://groups.google.com/groups/opt_out.

Database Validation In Selenium Webdriver