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

174
Vistas
Cypress unable to find form element on webpage

I'm currently trying to do some very basic tests in regards to the input fields at https://whitelabel.sandbox.array.io/signup?platform=v3 but having trouble in Cypress in finding the form elements. The code I have is as follows:

describe('Verify identity data', () => {

  it('Makes an assertion', function () {
    cy.visit('https://whitelabel.sandbox.array.io/signup?platform=v3');
    cy.get('input[name=firstName]');

  });

});

However Cypress is giving me the error:

Timed out retrying after 4000ms: Expected to find element: input[name=firstName], but never found it.

Am I using the incorrect selector here? Any advice would be appreciated!

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

It is because you are using a shadow DOM

to access use .shadow https://docs.cypress.io/api/commands/shadow

describe("Verify identity data", () => {
  it("Makes an assertion", function () {
    cy.visit("https://whitelabel.sandbox.array.io/signup?platform=v3");
    cy.get("array-account-enroll").shadow().find('input[name="firstName"]');
  });
});
about 4 years ago · Santiago Trujillo Denunciar

0

There's a shadow root in the DOM, but it's pretty high up in the DOM and likely to affect a lot of your commands.

Add a config setting to the test or to cypress.confi.js and you won't have to worry about appending every command.

describe("Verify identity data", {includeShadowDom: true}, () => {

  it("Makes an assertion", function () {
    cy.visit("https://whitelabel.sandbox.array.io/signup?platform=v3");

    cy.get('input[name="firstName"]');
    cy.get('input[name="lastName"]');
  });
})
about 4 years ago · Santiago Trujillo Denunciar
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