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

149
Vistas
cypress doesn't recognize the element I'm trying to find by placeholder

the element:
<input type="text" class="form-control" placeholder="What's this article about?"

How did I identify:
cy.get("input[placeholder=What's this article about?]").type("<3");

the error:
Syntax error, unrecognized expression: input[placeholder=What's this article about?]

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Try this:

cy.get("input[placeholder=\"What's this article about?\"]").type("<3");

or this with less escape characters:

cy.get('input[placeholder="What\'s this article about?"]').type("<3");
about 4 years ago · Juan Pablo Isaza Denunciar

0

Another way can be to use the [attribute*=value] selector. This selects every element whose attribute value contains the substring of the original string. So in your case it could be [placeholder*="article"] or [placeholder*="article about"], basically you can add any substring you want.

Word of caution - This should only be used when you know for sure that the occurrence of the sub string that your are searching for is once, that is your target element.

cy.get('input[placeholder*="article about"]').type('<3')

Or if you have multiple occurrences, then you have to use eq to reach that element.

about 4 years ago · Juan Pablo Isaza 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