RE: what are the approaches to check delete functionality in selenium web driver

there is a grid where there are records with delete icon (in each row). if we click on delete icon the record is deleted. now using selenium webdriver. i think we can test by verifying the message after the deletion and verifying the database. my question is what is the best way to implement the asserts in order to cover both the conditions.

[consider asserts in testNG]

Add Comment
2 Answers

Hi Amol,

You can do it as below.

1. Count the number of delete buttons available in the beginning = initial count.

2. Click the delete button and assert the count = current count.

3. If initial count  < current count, we can confirm that the delete functionality is working.

Doctor Answered on June 16, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.