0
0
Cypresstesting~10 mins

cy.go() for browser history 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 navigate one step back in browser history using Cypress.

Cypress
cy.[1]()
Drag options to blanks, or click blank then click option'
Ago
Bback
Cnavigate
DgoBack
Attempts:
3 left
💡 Hint
Common Mistakes
Using goBack() which is not a Cypress command.
Using back() which is not a valid Cypress command.
Using navigate() which does not exist in Cypress.
2fill in blank
medium

Complete the code to move two steps forward in browser history using Cypress.

Cypress
cy.go([1])
Drag options to blanks, or click blank then click option'
A-2
B'forward'
C'back'
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Using negative numbers to move forward.
Passing strings like 'forward' instead of numbers.
Passing 'back' which moves backward.
3fill in blank
hard

Fix the error in the code to move one step back in browser history.

Cypress
cy.go([1])
Drag options to blanks, or click blank then click option'
A'back'
B-1
C1
D'forward'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing positive numbers to go back.
Using commands other than cy.go().
4fill in blank
hard

Fill both blanks to move one step forward and then one step back in browser history.

Cypress
cy.go([1])
cy.go([2])
Drag options to blanks, or click blank then click option'
A1
B-1
C2
D-2
Attempts:
3 left
💡 Hint
Common Mistakes
Using negative numbers to go forward.
Using numbers greater than 1 for single steps.
Mixing up the order of forward and back.
5fill in blank
hard

Fill all three blanks to move two steps back, then one step forward, then one step back in browser history.

Cypress
cy.go([1])
cy.go([2])
cy.go([3])
Drag options to blanks, or click blank then click option'
A-2
B1
C-1
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive numbers to move back.
Using strings instead of numbers.
Mixing up the order of steps.