Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

229
Vistas
Signing into Office with Puppeteer not working?

Whenever I try to use Puppeteer to sign into an Office account, it always says to "Enter a valid email address" on the logging in site (and I know the email is valid, I have tested it). I looked through some other questions, and one of them mentioned that they might have login preventions for Puppeteer, Selenium, etc, though I am not sure. I am able to login if I do it manually.

Here's the code that handles all of that:

var email = "myemail@outlook.com"

await page.evaluate((em)=>{
    document.querySelector(`[type="email"]`).value = em;
  },email);

  await page.screenshot({
    path:"./email_input.png"
  })

  await page.waitForTimeout(1000);
  await page.evaluate((em)=>{
    var interval = setInterval(() => {
        if(document.querySelector(`[type="email"]`).value === em){
            document.querySelector(`[type="submit"]`).dispatchEvent(new Event('click'));
            clearInterval(interval);
        }
    });
  },email);

  await page.screenshot({
      path:"./sign_in_email.png"
  })

edit to ManuelMB's comment: It was just a check to make sure that the value was actually the email. It still doesn't work without it.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda