You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Add busy option to getByRole method #36233
We have several elements that render as skeleton blocks while loading and are then replaced with text on load finish. The goal here would be to use a locator to identify an element with a particular role but wait for aria-busy to be false.
Playwright already supports numerous aria properties here - such as expanded, pressed, selected etc. The inclusion of busy would be super helpful.
Alternatively if there's a better way to approach targeting these elements, I'm happy to hear your feedback.
Thanks ✌️
Reacted by Alex Marquis, Dan Kift, Kieran Osgood, Joey, Cindy Li, Zack Apiratitham, Daniel Nixon, Daniel Spasojevic, TT, tawago and 12 more
As a workaround, try the following. Please let me know whether this helps.
awaitpage.getByRole('cell').locator(':scope[aria-busy=false]').click();// Alternatively, you can assert that it cell becomes non-busy at some point:awaitexpect(page.getByRole('cell')).toHaveAttribute('aria-busy','false');
We have several elements that render as skeleton blocks while loading and are then replaced with text on load finish. The goal here would be to use a locator to identify an element with a particular role but wait for aria-busy to be false.
rather than wait for aria-busy=false could you just wait for the final content to be present?
more generally, can yall provide some specific usecases so we can better understand the problem trying to be solved?
We're closing all P3-collecting-feedback issues and retiring the label. #43813 explains why. This doesn't mean the request is wrong. If it still matters to you, please open a new issue against the latest Playwright version with your concrete use case and link back here.
Activity
tawago commentedon Aug 8, 2025
+1 for this!
Targeting on a Skeleton loader element will be much easier with this.
tawago commentedon Aug 18, 2025
Dmitry Gozman (@dgozman) just wondering, How many thumbs-up would be "popular" enough for the PR to be reopened?
dosomder commentedon Aug 20, 2025
Would be a really useful feature!
zoehneto commentedon Aug 20, 2025
We would really appreciate this!
dgozman commentedon Aug 28, 2025
As a workaround, try the following. Please let me know whether this helps.
dcrousso commentedon Jun 15, 2026
rather than wait for
aria-busy=falsecould you just wait for the final content to be present?more generally, can yall provide some specific usecases so we can better understand the problem trying to be solved?
pavelfeldman commentedon Oct 31, 2026
We're closing all
P3-collecting-feedbackissues and retiring the label. #43813 explains why. This doesn't mean the request is wrong. If it still matters to you, please open a new issue against the latest Playwright version with your concrete use case and link back here.