Reputation: 893
I am tester and beginer in Cypress. I have a editor and typing it any text. After typing I want to select my typing text and do with it anything /ex. change a style/
this is my html code
<div class="editor">
<p> my text </p>
</div>
Does anyone have a way on how to do that?
Upvotes: 3
Views: 2765
Reputation: 7891
Set type to {selectall}
- https://docs.cypress.io/api/commands/type.html#Week-Inputs
cy.get('.editor').type('{selectall}');
Upvotes: 3