|

Using xPath

  • Variable = page.locator(‘xpath=<the actual xpath>’)
  • print(Variable.text_content())

Examples in Practice