Playwright browser Auth0 authentication fails and says invalid json

91 Views Asked by At

I have ran into a weird problem - need help from playwright experts

I am using TS + Playwright for UI Automation and the browser i am using like projects:

projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'] 
      , channel:'chrome' 
    }]

chrome instance opened, when trying to authenticate with Auth0 endpoint sends request like this and fails
enter image description here
1. response : invalid json

when opening browsers manually, this works fine
Also have tried launching chrome browser with Selenium and working fine

I have copied the curl(failed one), attempted in postman after converting the payload into json format and it worked - But playwright launched browser somehome hitting api as raw text instead of json( and i beleive that's why system responds with 400 error)

Tried launching browser with selenium - it worked as expected

Is there any specific settings in playwright browser which needs to be set for this

0

There are 0 best solutions below