login with other email added
parent
665e31fae9
commit
78a85d1c61
9
utils.js
9
utils.js
|
@ -80,6 +80,15 @@ const tryTemuLogin = async function (page, username, password) {
|
|||
console.log( 'No Login Required' );
|
||||
return;
|
||||
}
|
||||
// if already account added
|
||||
const differentAccountSelector = "body > div.MDL_outerWrapper_123.MDL_modal_123 > div > div > div > div.MDL_body_123 > div > div._1RYwO6mj > span:nth-child(1)"
|
||||
await page.waitForSelector(differentAccountSelector, { timeout: 5000 }).catch(() => {});
|
||||
const differentAccountSelectorExists = (await page.$(differentAccountSelector)) !== null;
|
||||
if (differentAccountSelectorExists) {
|
||||
await page.click(differentAccountSelector);
|
||||
}
|
||||
|
||||
|
||||
// click on Sign in link
|
||||
const selector = "div._31ia9mDL._3n05KUVj._1fE9CAB_";
|
||||
await page.waitForSelector(selector, { timeout: 5000 }).catch(() => {});
|
||||
|
|
Loading…
Reference in New Issue