- Include details about your goal
I want to visit website and click an element this is the 1st test then the 2nd test will visit the same website again and click an element. the two tests in one describe
-
Describe expected and actual results open website and click element then in the 2nd test open same website and click element
-
Include any error messages
NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://gcpsmapi.example.com/sec/submit-events': Synchronous XHR in page dismissal.
I tried to search google with no luck or solution .i used beforeEach and i tried each test alone and it worked . but together is not working .
describe('Checkout', () => {
it('Checkout with empty cart', () => {
cy.visit('https://www.example.com')
cy.get('.lgi_btn_3').click()
cy.get('.xo-header__cart > .xo-header__navigation-button > .xo-core-header-icon').click()
cy.url().should('include', 'https://www.example.com/shop/winkelwagen/index.shtml')
cy.contains('empty').should('be.visible')
})
it('2nd', () => {
cy.visit('https://www.example.com')
cy.get('.lgi_btn_3').click()
cy.get('.xo-header__cart > .xo-header__navigation-button > .xo-core-header-icon').click()
cy.url().should('include', 'https://www.example.com/shop/winkelwagen/index.shtml')
cy.contains('empty').should('be.visible')
})
})
Aucun commentaire:
Enregistrer un commentaire