File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ when a real user uses it.
7777 - [ ` getByAltText ` ] ( #getbyalttext )
7878 - [ ` getByTitle ` ] ( #getbytitle )
7979 - [ ` getByValue ` ] ( #getbyvalue )
80+ - [ ` getByRole ` ] ( #getbyrole )
8081 - [ ` getByTestId ` ] ( #getbytestid )
8182 - [ ` wait ` ] ( #wait )
8283 - [ ` waitForElement ` ] ( #waitforelement )
@@ -361,15 +362,15 @@ getByRole(
361362 exact?: boolean = true ,
362363 collapseWhitespace?: boolean = false ,
363364 trim?: boolean = true ,
364- }): HTMLElement `
365+ }): HTMLElement
365366```
366367
367368A shortcut to `` container.querySelector(`[role="${yourRole}"]`) `` (and it
368369also accepts a [ ` TextMatch ` ] ( #textmatch ) ).
369370
370371``` javascript
371372// <div role="dialog">...</div>
372- const dialogContainer = getByTestrole (container, 'dialog')
373+ const dialogContainer = getByRole (container, ' dialog' )
373374```
374375
375376### ` getByTestId `
You can’t perform that action at this time.
0 commit comments