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

161
Views
¿Cómo puedo obtener el texto del botón de búsqueda utilizando la herramienta de prueba de extremo a extremo de PlayWright?

¿Cómo puedo obtener el texto del botón de search en la herramienta de prueba de extremo a extremo de PlayWright ? Lo intenté a continuación y page.innerText(selector, options) pero no estoy definido. ¿Alguien puede indicar por qué el método innerText no funciona aquí?

//homePage.js

 const { expect } = require('@playwright/test'); exports.HomePage = class HomePage { constructor(page) { this.page = page; this.getSearchButton = page.innerText(.RoundButton__root .RoundButton__root--blue'); } async goto() { await this.page.goto('https://www.localsearch.com.au/'); } async getSearchButtonText() { await this.getSearchButton ; } }

//inicio.js

 const { test, expect } = require('@playwright/test'); const { HomePage } = require('../pom/homePage'); test('Verify Search button text', async ({ page }) => { const homePage = new HomePage(page); await homePage.goto(); const text = await homePage.getSearchButtonText(); console.log("Search text::"+text); });
about 4 years ago · Juan Pablo Isaza
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!