Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get selector with specific text puppeteer

const [button] = await page.$x("//button[contains(., 'Button text')]");
if (button) {
    await button.click();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #selector #specific #text #puppeteer
ADD COMMENT
Topic
Name
3+4 =