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

96
Visualizações
How would I target this tag in puppeteer

I was doing an automation fun project and I choose this website https://agoodmovietowatch.com/ this is a single-page website so to target the sign-up link I inspect and find that this sign-up link is not a

<a>  
tag but an
<h6>  
tag and I cant able to target it, I tried all combinations to select it every class it contains but failed. If someone knows so tell me, please.

here is my code :

await page.waitForSelector("div.tss-1xh7ius-secondaryLinksContainer.MuiBox-root.mui-0 div.text_container__2Nx5h.tss-w9yc2n-secondaryLink.MuiBox-root.mui-0");

await page.click("div.tss-1xh7ius-secondaryLinksContainer.MuiBox-root.mui-0 div.text_container__2Nx5h.tss-w9yc2n-secondaryLink.MuiBox-root.mui-0");
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Here is a working solution:

const signUpBtn = await page.$(".tss-1xh7ius-secondaryLinksContainer > div")
await signUpBtn.click()

And to select "the very best", you can use:

await page.click(".tss-1ch6vtq-buttonsContainer :first-child")

If you want to learn more about CSS selectors, I recommend checking out this nice and funny teaching website: CSS Diner

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