0
0
Cypresstesting~10 mins

Headless mode in Cypress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run Cypress tests in headless mode using the CLI.

Cypress
npx cypress run --[1]
Drag options to blanks, or click blank then click option'
Aheadless
Bheaded
Copen
Dbrowser
Attempts:
3 left
💡 Hint
Common Mistakes
Using --headed runs tests with the browser UI visible.
Using --open opens the Cypress Test Runner UI, not headless mode.
2fill in blank
medium

Complete the code to specify Chrome browser in headless mode for Cypress tests.

Cypress
npx cypress run --browser [1] --headless
Drag options to blanks, or click blank then click option'
Aelectron
Bfirefox
Cchrome
Dedge
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing Firefox or Edge when the question asks for Chrome.
Omitting the --headless flag.
3fill in blank
hard

Fix the error in the command to run Cypress tests headlessly in Electron browser.

Cypress
npx cypress run --browser electron --[1]
Drag options to blanks, or click blank then click option'
Aheadless
Bheaded
Copen
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using --headed runs tests with UI, not headless.
Using --open opens the Test Runner UI.
4fill in blank
hard

Fill both blanks to run Cypress tests headlessly and save videos.

Cypress
npx cypress run --[1] --[2]
Drag options to blanks, or click blank then click option'
Aheadless
Bno-video
Crecord
Dvideo
Attempts:
3 left
💡 Hint
Common Mistakes
Using --no-video disables video saving.
Using --record is for recording tests to Cypress Dashboard, not video saving.
5fill in blank
hard

Fill all three blanks to run Cypress tests headlessly on Firefox with a specific config file.

Cypress
npx cypress run --browser [1] --[2] --config-file [3]
Drag options to blanks, or click blank then click option'
Achrome
Bfirefox
Ccypress.config.js
Dheadless
Attempts:
3 left
💡 Hint
Common Mistakes
Using chrome instead of firefox.
Omitting the headless flag.
Not specifying the config file correctly.