Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
Necesito obtener texto de una clase de intervalo dentro de iframe en dramaturgo javascript

Imagen de estructura HTML

¿Alguien puede explicarme cómo obtener el texto del botón de inicio del juego que está presente dentro de iFrame en Playwright JavaScript?

Intenté usar el siguiente código pero eso no funciona para mí

 console.log(frame) // const text= await frame.locator("//div[text()='Start Game']").textContent(); // console.log(text);```
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use la función frameLocator para acceder al contenido dentro de iFrame.

 const btnStart = page.frameLocator('#external-app').locator('text=Start Game'); await btnStart.click();

Más detalles: https://playwright.dev/docs/api/class-framelocator

Para acceder al valor o al texto, puede usar page.innerText() o page.inputValue() .

Más información aquí: https://playwright.dev/docs/api/class-page#page-input-value

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!