You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe("page", () => {
it("works", () => {
cy.visit("https://example.cypress.io");
cy.get("body").children(".container").as("container");
cy.visit("https://example.cypress.io");
cy.get("@container");
});
it("does not work", () => {
// The test case works in Cypress 10.4.0
// The test case does not work in Cypress 10.5.0+
cy.visit("https://example.cypress.io");
cy.get2("body").children(".container").as("container");
cy.visit("https://example.cypress.io");
cy.get("@container");
});
});
Current behavior
Cypress throws an error saying the cy.get2 returns undefined.
Desired behavior
In this situation, cy.get should still get the same element as I get in step 1.
The script worked on 10.4.0.
Test code to reproduce
https://github.com/haipinggong/cypress-test-tiny/tree/alias-bug
support/command.js file:
Cypress Version
10.5.0+
Node version
16.15.0
Operating System
Windows 11
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: