mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-18 22:28:38 -05:00
1.3 KiB
1.3 KiB
title, comments, description
| title | comments | description |
|---|---|---|
| log | true |
Print a message to the Command Log within Cypress.
| Returns | null |
| Timeout | cannot timeout |
cy.log( message )
Print the message to the Command Log.
cy.log( message, arguments )
Print the message to the Command Log, along with any arguments.
Usage
Log a message to the Command Log.
cy.log('Login successful')
Arguments Usage
Log a message with arguments to the Command Log.
// print previously saved variable 'events' to the Command Log.
cy.log('events triggered', events)
Command Log
Print messages with arguments to the Command Log.
cy
.log('log out any message we want here')
.log('another message', ['one', 'two', 'three'])
The commands above will display in the command log as:
When clicking on log within the command log, the console outputs the following: