Udemy Playwright: Web Automation Testing From Zero to Hero: Difference between revisions

Jump to navigation Jump to search
m
Line 428: Line 428:
}</nowiki>
}</nowiki>


I couldn't get <code>const checkBoxes = await page.getByRole("checkbox").all()</code> and then use array <code>forEach(...)</code> to work, not sure why ... but using the for loop is documented in the method tooltip ...
Note: force needed because <code>class="native-input visually-hidden"</code> ie. the element is hidden, and force suspends Playwright's the actionability checks (ie. Visible, Stable, Receives Events, Enabled)
 
Also I couldn't get <code>const checkBoxes = await page.getByRole("checkbox").all()</code> and then use array <code>forEach(...)</code> to work, not sure why ... but using the for loop is documented in the method tooltip ...


=== Lists & Dropdowns ===
=== Lists & Dropdowns ===

Navigation menu