I'm having an issue as the page is not fully loaded. I tried the cy.wait(1000) method, which I do believe is not a good solution, but still not working, the page is not fully loaded.
Here is the website that I'm trying to test https://www.24mx.ie/. The
code is 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:
