Skip to main content

How to hold shift and use arrow keys in Cypress

I have an issue when using the Cypress type() command in the way I want.

My objective

I want to be able to select and delete text in a textfield. I want this done via holding the shift key, pressing the right arrow key multiple times and then pressing the delete key.

My attempt

//hold shift and use right arrow
cy.type('{shift}{rightarrow}'.repeat(10));
//press delete
cy.type('{del}');
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW

Comments