0
0
Cypresstesting~10 mins

Timeout configuration 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 set the default command timeout to 10000 milliseconds.

Cypress
Cypress.config('[1]', 10000);
Drag options to blanks, or click blank then click option'
ApageLoadTimeout
BdefaultCommandTimeout
CrequestTimeout
DresponseTimeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using pageLoadTimeout instead of defaultCommandTimeout.
Confusing request and response timeout options.
2fill in blank
medium

Complete the code to set the page load timeout to 60000 milliseconds.

Cypress
Cypress.config('[1]', 60000);
Drag options to blanks, or click blank then click option'
ApageLoadTimeout
BdefaultCommandTimeout
CrequestTimeout
DresponseTimeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using defaultCommandTimeout instead of pageLoadTimeout.
Mixing up request and response timeout options.
3fill in blank
hard

Fix the error in the code to set the request timeout to 15000 milliseconds.

Cypress
Cypress.config('[1]', 15000);
Drag options to blanks, or click blank then click option'
Arequest_time_out
Brequesttimeout
CrequestTimeout
Drequest-timeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or snake_case instead of camelCase.
Adding dashes or underscores in the option name.
4fill in blank
hard

Fill both blanks to set the response timeout to 20000 milliseconds and verify it with a console log.

Cypress
Cypress.config([1]: 20000);
console.log('Response timeout is set to', Cypress.config([2]));
Drag options to blanks, or click blank then click option'
AresponseTimeout
BrequestTimeout
CdefaultCommandTimeout
DpageLoadTimeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using different option names for set and get.
Confusing response timeout with request timeout.
5fill in blank
hard

Fill all three blanks to set multiple timeouts: default command to 8000, page load to 45000, and request to 12000 milliseconds.

Cypress
Cypress.config({
  [1]: 8000,
  [2]: 45000,
  [3]: 12000
});
Drag options to blanks, or click blank then click option'
AdefaultCommandTimeout
BpageLoadTimeout
CrequestTimeout
DresponseTimeout
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the timeout option names and values.
Using responseTimeout instead of requestTimeout.