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 Dear,
you can do one thing.
get the webelement of delete button and then verify it with assert using assert method ‘assertequal(<true>,<webelement.isdisplayed()>)’.

like this way if webelement is deleted then it will not be displayed and hence verified via assert.

Train Answered on May 31, 2016.
Add Comment

Your Answer

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