Closed parvinders347 closed 8 months ago
You need to make sure to provide valid cookie fields to https://pptr.dev/api/puppeteer.page.setcookie/ which might involve parsing attributes from the JSON value and mapping the fields. In general, this is kind of question is better suitable for StackOverflow, please post the question there.
okay thanks i will post question on stackoverflow
Feature description
I'm working on automating a login process using Puppeteer for a website that utilizes Netscape cookies for authentication. I've obtained the necessary Netscape cookies from a previous session and now I want to use them to log in programmatically. However, I'm encountering some difficulties in implementing this process.
Could someone provide guidance or a code example on how to set Netscape cookies in Puppeteer and use them to authenticate a user session? Specifically, I need assistance with the steps to properly set the cookies and navigate through the login flow using Puppeteer.
This code is for json cookies working fine but i want to login using txt netscape cookies
I've tried setting the cookies using the page.setCookie() method and then navigating to the login page but its not working. I want to log in with Netscape cookies
Error: ProtocolError: Protocol error (Network.setCookies): Invalid cookie fields