Cypress Command: terminalType
Summary
cy.terminalType(text)
- Type and execute commands within the current Terminal Parameters
text
- Text to send to the terminal
Examples
cy.terminalType("uname");
Waiting
This Cypress command does not wait. Use terminalShouldContain to wait for shell command output or terminalShouldHavePath to wait for creation of a file.
Verification
This Cypress command does not verify anything. Use terminalShouldContain or terminalShouldHavePath to verify the effect of a shell command.
Related
- See clickCodeBlockContaining or clickCodeBlock for running commands that are available within the lab instructions to reduce test maintenance effort and increase test fidelity
- You must have already called startLab to start the lab
Not Instruction-Guided
This is not an instruction-guided Cypress command: It allows the test to run terminal commands that are not contained within the lab instructions. While appropriate in some situations, care must be taken to avoid accidentally writing tests that pass even when instructions don’t work.