Monday, June 3, 2024
62
rated 0 times [  68] [ 6]  / answers: 1 / hits: 16642  / 3 Years ago, fri, march 19, 2021, 12:00:00

I would like to select "All" option from the below DOM using Playwright JS, and I have tried page.selectOption('select#rows per page', '-1'); and page.selectOption('id=mui-55656', '-1'); to no avail. Any help would be appreciated. Thanks. enter


More From » webautomation

 Answers
27

You should be able to select the option using the aria-label


await page.selectOption('[aria-label="rows per page"]', '-1');

[#50347] Monday, March 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
beatrizrheaq

Total Points: 73
Total Questions: 89
Total Answers: 107

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
;