Open rafalradomski opened 3 years ago
Hi @mifi looks like when you log in to Instagram sometimes switch back language to the current location and isLoggedIn function return false even when you are logged in because the text "Home" is diff in other languages...
const isLoggedIn = async () => (await page.$x('//*[@aria-label="Home"]')).length === 1;
To pass that checking you need to change the language manually after login at the bottom of the page
Oh, thanks for reporting. So for other languages than english, there is no Home aria label?
Hi @mifi looks like when you log in to Instagram sometimes switch back language to the current location and isLoggedIn function return false even when you are logged in because the text "Home" is diff in other languages...
const isLoggedIn = async () => (await page.$x('//*[@aria-label="Home"]')).length === 1;
To pass that checking you need to change the language manually after login at the bottom of the page