Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

107
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda