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

392
Vistas
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 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