Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command anomaly #6146

alastair-todd opened this issue Jan 12, 2020 · 1 comment

Add command anomaly #6146

alastair-todd opened this issue Jan 12, 2020 · 1 comment


Copy link

@alastair-todd alastair-todd commented Jan 12, 2020

Cypress.Commands.add('getAlias', (alias:string) => cy.get(`@${alias}`));

results in

TypeError: command.get is not a function


Cypress.Commands.add('alias', (alias:string) => cy.get(`@${alias}`));

does not

what trickerypokery?


This comment has been minimized.

Copy link

@jennifer-shehane jennifer-shehane commented Jan 13, 2020

I can recreate this behavior.

Cypress.Commands.add('getAlias', (alias:string) => cy.get(`@${alias}`));


The command above throws the error TypeError: command.get is not a function when called

Screen Shot 2020-01-13 at 11 41 01 AM

This error is throwing from this line of code as shown from the stack trace you can see when you click on the yellow error:


I thought this may have been some sort of regression with a decaffeinated file but this error throws back to version 3.4.1.

I believe this is throwing because we have an internal command called cy.getAlias

So, this is a 'reserved name' of sorts although there's no documentation of this.


Name your custom command anything other than getAlias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.