I am having an issue as the page is not fully loaded. I tried cy.wait(1000), I do believe is not a good pattern, but still not working, page is not fully loaded. here is the website that I am trying to test https://www.24mx.ie/. code in the file homePage.js
class HomePage {
static loadHomePage() {
cy.visit(Cypress.env('url') + '.ie/');
cy.wait(1000)
}
static acceptCookies() {
cy.get('div.m-button.m-button--navigation.m-button--xs.qa-consent-agree-btn.ng-tns-c95-8').click();
}
}
export default HomePage
code in the file homePage.spec.js
import HomePage from '../pageObjects/homePage'
describe('Home Page Test', function () {
it('Home Page TC', function () {
HomePage.loadHomePage();
})
it('Accepting Cookies TC', function () {
HomePage.acceptCookies();
})
})
Here is a print screen from the test:

Aucun commentaire:
Enregistrer un commentaire