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

106
Vistas
Protractor locator for multiple elements with same formControlName

I am trying to locate an element which is text field, and provided with formControlName. But the formControlName is same for all the input fields that comes after clicking on the add button. So how can i insert into the nth text field with same formControlName? how to fetch the total count of elements with same formControlName?

I am new to this automation using protractor, please do help.

We are currently using cucumber framework with protractor javascript.

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

0

To fetch the total count of elements with same formcontrolname can be achieved by using

var count = await element.all(by.xpath("ElementXpath")).count();

If you want to input to nth element it can be done by providing the number with the locator for example,

//input[name='subject'][3]

here,it will select the 3rd input with name subject from top to bottom order

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