Bird
0
0

What happens when Cypress runs a test inside the browser regarding network requests?

medium📝 Predict Output Q5 of 15
Cypress - Basics and Setup
What happens when Cypress runs a test inside the browser regarding network requests?
ACypress cannot see network requests at all
BNetwork requests are blocked by default
CNetwork requests run only after tests finish
DCypress can intercept and modify network requests in real time
Step-by-Step Solution
Solution:
  1. Step 1: Understand Cypress network control

    Cypress runs inside the browser and can intercept, stub, or modify network requests during tests.
  2. Step 2: Evaluate other options

    Options A, B, and D contradict Cypress's ability to control network traffic.
  3. Final Answer:

    Cypress can intercept and modify network requests in real time -> Option D
  4. Quick Check:

    Network interception = Cypress feature [OK]
Quick Trick: Cypress intercepts network calls inside browser [OK]
Common Mistakes:
  • Assuming network requests are blocked
  • Believing Cypress can't access network
  • Thinking network runs after tests

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes