So I have a really basic app that I want to log in and it gives me this error after I try with this code here
Cypress.Commands.add("test", () => {
let appUrl = "baseurl";
cy.visit(appUrl);
let usernameCredentials = "test";
let passwordCredentials = "test";
let connectWithLocalAdminButton = cy.xpath(
"//button[normalize-space()='Connect with Local Admin']"
);
connectWithLocalAdminButton
.should("be.visible")
.contains("Connect with Local Admin")
.click();
let usernameInputField = cy.get("#username");
usernameInputField
.should("be.visible")
.click()
.clear()
.type(usernameCredentials);
let passwordInputField = cy.get("#password");
passwordInputField
.should("be.visible")
.click()
.clear()
.type(passwordCredentials);
let localAdminLoginButton = cy.xpath(
"//button[normalize-space()='Local Admin Login']"
);
localAdminLoginButton
.should("be.visible")
.contains("Local Admin Login")
.click();
});
Tried to increase the pageLoadTimeout value but it didn't work.. tried different browsers but still didn't work