You are testing a RESTful API using Playwright with TypeScript. Your task is to validate the response of a GET request to the /users/1 endpoint of your application. You want to programmatically make the API call, verify the response code, and extract the user details in JSON format. Which of the following methods should you use to correctly send the HTTP GET request using Playwright?

page.request()
fetch()
request.newContext().get()
APIRequestContext.get()
Verified Answer
Correct Option - d

To get all Infosys Certified Playwright Typescript Automation Tester Obj Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram