Playwright · Middle · Question 70 of 75

How do you make an API request with the cookies of the logged-in page?

Show the answer

Correct answer: Use page.request, which shares the context's cookies

Explanation

page.request and context.request share storage with the browser context. The standalone request fixture has its own.

Further reading

Problem with a question

Playwright · Middle · question 70

Test yourself

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

Take this quiz