Skip to content

Commit d07ca01

Browse files
committed
docs(website): fix the selector alias example
I'm relatively certain that this example wasn't intended to have the `PageElement.located(` on it. I discovered this mistake when I tried to use the example. Now, it matches the `byRole` example above it. I've tried it and it seems to work.
1 parent 20db39f commit d07ca01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/docs/handbook/web-testing/page-element-query-language.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ selector value using an [`Answerable<string>`](/api/core#Answerable):
129129
import { Answerable, q } from '@serenity-js/core'
130130
import { By, PageElement } from '@serenity-js/web'
131131

132-
const byTestId = (dataTestId: Answerable<string>) =>
133-
PageElement.located(By.css(q`[data-test-id="${ dataTestId }"]`))
132+
export const byTestId = (dataTestId: Answerable<string>) =>
133+
By.css(q`[data-test-id="${ dataTestId }"]`)
134134
```
135135

136136
Note that the example above uses [tag function `q`](/api/core/function/q) to concatenate a static string with an [`Answerable<string>`](/api/core/#Answerable).

0 commit comments

Comments
 (0)