Playwright Python - Role Locator

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 2

  • @nishanthN4B2
    @nishanthN4B2 10 місяців тому +1

    Hiya, I've got a getbyRole ('cell', {name : 'Invalid (2)}). Now the issue is, the number 2 is not constant, it's dynamic, please can I know how to add this to only look at invalid and ignore the (2) ?

    • @rahulmula
      @rahulmula  10 місяців тому

      The name isn't strict so you can use regular expressions or simply "Invalid". More here playwright.dev/docs/api/class-page#page-get-by-role-option-name.