all_links = await page.locator("locator copied from html").all() for link in all_links: text = await link.inner_text() print(text)
Using "selector" not "xPath"