I didn't have time to test that solution (and I think it isn't the best way to do this) but I think you will need to sign in to Linkedin with your browser (to start a session) and find the li_at cookie in the DEV tools. Then, you will be able to set this cookie before navigating to Linkedin (just before the await page.goTo(...))
Hi Lucas,
I didn't have time to test that solution (and I think it isn't the best way to do this) but I think you will need to sign in to Linkedin with your browser (to start a session) and find the
li_at
cookie in the DEV tools. Then, you will be able to set this cookie before navigating to Linkedin (just before theawait page.goTo(...)
)I really recommend you to create a simple function to check if you are logged in or not. Something like
I think this function needs to be called after the
setCookie
because your Linkedin session can be finished.Feel free to add some additional information about this solution or suggest a better way to do that.