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

63
Visualizações
Access to Input field Puppetier

i have a puppeteer scraper and i have to insert credit card information. I have no problem to access Cvv and Expire field, but i cannot type in cc number field.

the input filed in inside iframe llike this

<iframe src="bla bla bla my url" scrolling="no" name="FrameCCPay" id="FrameCCPay" frameborder="0" allowtransparency="true" style="width: 100px; height: 18px; border: none; margin: 0px; padding: 0px; min-width: 100%; overflow: hidden;"></iframe>

In frame's document there is this code

<div class="placePan">
   <div class="input-container">
      <input type="tel" autocomplete="off" spellcheck="false" name="482e7f7b-59aa-3f0d-bde7-8dcf6bcee7a7" class="cleavePan hasError" id="482e7f7b-59aa-3f0d-bde7-8dcf6bcee7a7" maxlength="24" placeholder="Numero Carta" style="display: inline-block;">
      <input type="tel" autocomplete="off" spellcheck="false" class="cleavePan" id="482e7f7b-59aa-3f0d-bde7-8dcf6bcee7a7_bin" maxlength="24" placeholder="Numero Carta" style="display: none;">
   </div>
</div>

My Puppetier code

const frame = getFrame(this.page, "FrameCCPay")
await frame.waitForSelector(".placePan input")
await frame.focus('.placePan input')
await frame.type(".placePan input", mynumber)

This code is working for the other filed as i said, and the filed ae done in the same way. The only difference is that cc umber have two input filed with same class (.placePan input) so i think it's here the problem.

I can use TYPE function in the right input type? how can i exlucde the .placePan input that is hidden?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you think the issue is the hidden input, use a selector with an attribute that is present in the needed input only: ".placePan input[name]".

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