Bird
0
0

What will happen if you run the command cypress run --browser chrome?

medium📝 Predict Output Q4 of 15
Cypress - CI/CD and Reporting
What will happen if you run the command cypress run --browser chrome?
ATests run headlessly in Chrome browser
BTests open in Chrome browser GUI for manual interaction
CTests run headlessly in Electron browser ignoring Chrome
DCommand fails because browser option is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Understand the --browser flag

    This flag specifies which browser to use for running tests headlessly.
  2. Step 2: Analyze command behavior

    cypress run --browser chrome runs tests headlessly using Chrome browser, not Electron.
  3. Final Answer:

    Tests run headlessly in Chrome browser -> Option A
  4. Quick Check:

    --browser chrome runs headless Chrome [OK]
Quick Trick: Use --browser to specify browser for headless runs [OK]
Common Mistakes:
  • Thinking it opens GUI instead of headless
  • Assuming Electron is always used
  • Believing the command is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes