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

389
Visualizações
Checking for child objects with Playwright

I'm working on writing a test that will determine whether objects on the page are children of another object.

I know that I can use document.querySelector(selector).hasChildNodes(); to get a boolean whether the selector has children or not. However, (and this is likely because I'm new to Playwright) I cannot seem to find an equivalent method that works with the playwright test runner. For example,

const childTruth = page.querySelectory('.class').hasChildNodes();

Does not seem to allow .querySelectory to be used with page.

Is there any inbuilt methods that Playwright has to check for children of an object?

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