Hi, I need to create API request to get token. In my cypress tests i have code: Cy.request({ Method: 'POST', URL : 'myurl', Auth: {"idusername", "userpassword"}, Form: true, Body: { grant_type: 'passowrd', username: userLogin, password: userPassword, }, headers: { accept: 'json'}, })
I need the same action in playwright, but when I try to add fields like "auth", there is error with communication (406 video).
TL;DR -how to rewrite request code from cypress to playwright
This thread is trying to answer question "How to rewrite request code from Cypress to Playwright?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].