无法在剧作家中使用 google 执行社交登录,因为 google 阻止了它。有没有办法使用 Playwright?我正在使用铬

Can't perform Social Sign in with google in playwright as google prevents it. Is there a way around using Playwright? I'm using Chromium

在下面的代码中,我尝试使用 google 按钮登录,但在输入之后 电子邮件并单击下一步,它会将我带到错误屏幕,我已将其作为图片附上

it('Sign Up With Google ', async() => {
    await page.waitForSelector(signUpWithGoogle, { state: 'visible' });
    await page.click(signUpWithGoogle);
    await page.click(signUpWithGoogle);
    const [popup] = await Promise.all([
       page.waitForEvent('popup'),
       page.click(signUpWithGoogle),
       page.click(signUpWithGoogle)
    ])
    await popup.fill('//input[@type="email"]', googleEmail);
    await popup.click('//span[text()="Next"]');
    await popup.waitForTimeout(10000);
    await page.waitForTimeout(2000);
}, timeforSigninWithGoogle)

所以显然那些启用了 2F 身份验证的 google 帐户将无法登录,并且会在 chromium 中给你上述错误,但那些没有 2F 身份验证的帐户将在 webkit 和 chromium 上工作