This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Testing Google Search', () => { | |
// To Pass the Test Case 1 | |
it('I can search for Valid Content on Google', () => { | |
cy.visit('https://www.google.com'); | |
cy.get("input[title='Search']").type('Cypress').type(‘{enter}’); | |
cy.contains('https://www.cypress.io'); | |
}); | |
// To Fail the Test Case 2 | |
it('I can navigate to Wrong URL’', () => { | |
cy.visit('http://localhost:8080'); | |
cy.get("input[title='Search']").type('Cypress').type(‘{enter}’); | |
cy.contains('https://www.cypress.io'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment