doc(best-practices-js): improve wording

Signed-off-by: Denis LE <ledenis@users.noreply.github.com>
This commit is contained in:
Denis LE 2024-10-29 12:59:52 +01:00 committed by GitHub
parent 0221f15f4f
commit 410772f2b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,7 @@ await page
#### Prefer user-facing attributes to XPath or CSS selectors
Your DOM can easily change so having your tests depend on your DOM structure can lead to failing tests. For example consider selecting this button by its CSS classes. Should the designer change something then the class might change breaking your test.
Your DOM can easily change so having your tests depend on your DOM structure can lead to failing tests. For example consider selecting this button by its CSS classes. Should the designer change something then the class might change, thus breaking your test.
```js