Link Search Menu Expand Document

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.

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.