Bird
0
0

Which of the following is the correct syntax to move forward one page in browser history using cy.go()?

easy📝 Syntax Q12 of 15
Cypress - Navigation and URL
Which of the following is the correct syntax to move forward one page in browser history using cy.go()?
Acy.go('forward')
Bcy.go(-1)
Ccy.go('back')
Dcy.go(0)
Step-by-Step Solution
Solution:
  1. Step 1: Recall cy.go() arguments

    cy.go() accepts 'back', 'forward' or numbers like -1, 1 to move in history.
  2. Step 2: Identify correct forward syntax

    To move forward one page, use 'forward' or 1. Among options, only cy.go('forward') is correct syntax.
  3. Final Answer:

    cy.go('forward') -> Option A
  4. Quick Check:

    Forward navigation = 'forward' [OK]
Quick Trick: Use 'forward' string or 1 to go forward [OK]
Common Mistakes:
  • Using negative number to go forward
  • Using 'back' instead of 'forward'
  • Using 0 which does nothing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes