Home
Basics
Introduction Environment Setup Cypress Components First Test Running Tests Reports Element Identification GUI interaction Cypress Hooks Cypress Fixtures Integration with CI serversAdvanced
Page Object Model Custom Commands Intercepting Requests Backend Testing Interview Questions and AnswersFirst test in Cypress
It's a convention to keep the tests in cypress/e2e directory. And file name should end with .cy.js
describe('Softpost Test', function () {
it('Check title of page', function (){
cy.visit("https://softpost.org/selenium-test-page")
cy.title().should('include','Test')
});
});
In above example, we have navigated to https://softpost.org/selenium-test-page and then verified that the title contains "test" word. You can run below command to run test.npx cypress run --spec "cypress/e2e/title.cy.js" --browser chrome
Web development and Automation testing
solutions delivered!!