Cypress · Middle · Question 16 of 77

How do you handle a link that opens a new tab in Cypress?

Show the answer

Correct answer: Check the href or remove target; tabs aren't supported

Explanation

Cypress controls one tab. Checking the link's href or removing target=_blank before clicking tests the behaviour in place.

Further reading

Problem with a question

Cypress · Middle · question 16

Test yourself

Take the Cypress · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz