- Just executing test-case is not worthy, It need to be verified that changes has been reflected or not in-order to make it pass or fail. E.g. If tester enters wrong password on login page it should show error message and tester has to verify that error message has been shown or not.
- If an automation script executed some test-case then there should be code/step for verification of that test-case i.e. assertion of test-case.
- selenium-cucumber provides some predefined assertion steps. Using these steps automation tester can verify/assert test-case.
- Assertion steps include:
- Steps For Asserting Element Text
- Steps For Asserting Element Attribute
- Steps For Asserting Element Accesibility
- Steps For Asserting Element Visibility
- Steps For Asserting Checkbox
- Steps For Asserting Dropdown List
- Steps For Asserting Radio Button
- Steps For Asserting Links
- Steps For Asserting Difference in images
feature: Gmail Login As a user I should able to login into Gmail. scenario: I login with invalid credentials Given I open "http://www.gmail.com" And I enter username "email@example.com" And I enter password "wrong_password" when I click button "signIn" Then element having id "errormsg_0_Passwd" should be present Then element having id "errormsg_0_Passwd" should have text as "The email or password you entered is incorrect."