Update Record In Database For Selenium WebDriver Test

Main usage of database In selenium WebDriver Is getting records from tabular array too purpose them In your selenium examination equally per your requirement. Simple example Is you lot tin purpose that information to perform information driven testing or you lot tin verify information In tables which you lot convey Inserted through spider web application
forms. Now supposing you lot wants to update data take away In MySql information table too and therefore you lot wants to verify same affair In UI too therefore you lot tin create It real easily.

Note : Please read all previous posts on database testing. Links are listed on THIS PAGE.

Updating specific information prison theatre mobile telephone In MySql database table
In my previous post, We learnt how to pick out specific tape using PreparedStatement Interface. Now nosotros volition use executeUpdate() method to update specific tape which Is selected past times where clause.

Bellow given example volition educate elevate = "Danial" where id = five In user table. Main affair to larn In this example Is how to write inquiry string too educate Its parameters to update specific record. Execute bellow given example In eclipse.

DOWNLOAD UpdateRecordInDB.zip folder. You volition acquire UpdateRecordInDB.java examination script file In cypher folder when extract It. Import It In your eclipse too and therefore execute


At the halt of execution, It volition exhibit you lot databse tabular array records In console equally shown In inward a higher house Image. You tin run into In Image that records amongst id = five Is updated amongst elevate = "Danial". Now If you lot convey website UI too therefore you lot tin cheque same affair at that spot using selenium webdriver.

More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post