Allow formatting cy.log() text
See original GitHub issueCurrent behavior:
cy.log()
prints grey text to the left column:
Desired behavior:
cy.log()
takes an option for formatting, e.g. color, bold:
cy.log('Given I am logged in', { color: 'blue' })
Steps to reproduce:
N/A
Versions
3.x
Issue Analytics
- State:
- Created 5 years ago
- Reactions:16
- Comments:13 (3 by maintainers)
Top Results From Across the Web
log - Cypress Documentation
Print a message to the Cypress Command Log. ... Accepts a Markdown formatted message. args. ... Assertions. cy.log() cannot have any assertions chained....
Read more >cypress-io/cypress - Gitter
Anyone know how to convert a string from invoke('text') to a number? I am trying to grab a number from a span that...
Read more >cy.log color - Code Examples & Solutions For This Technical ...
cy.log color. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On December 9, 2020 Popularity 3/ ...
Read more >Cypress log Command - ProgramsBuzz
If a message needs to be printed for our reference in the command log of cypress, then the log command is used. Syntax...
Read more >Why cy.log Prints Nothing - Gleb Bahmutov
You would like to print the text from the element #username to Cypress Command Log. You know that Cypress commands are asynchronous, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use markdown in the
cy.log
message and it will be formatted. It looks like we don’t have this documented, so I’ve created an issue.While you can’t specify a color for the text, if you want blue text at least, you can trick it by making the message a link 😃
I just wanted to apply color other than the Bule and not to link. I just wanted to apply in normal text. Please do advice.