Skip to content

Commit 9658e3d

Browse files
authored
Grammar and markdown
1 parent 919fa05 commit 9658e3d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/selectors.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Selectors
1+
## Selectors
22

3-
The tips and tricks below will help you to write high quality selectors.
3+
The guidelines below will help you to write high quality selectors.
44

5-
### Selectors SHOULD be written in CSS instead of Xpath whenever possible.
5+
### Selectors SHOULD be written in CSS instead of Xpath whenever possible
66

7-
### Xpath selectors SHOULD NOT use `@attribute="foo"`. Instead you SHOULD use `contains(@attribute, "foo")` where `@attribute` is any valid attribute such as `@text` or `@class`.
7+
### Xpath selectors SHOULD NOT use `@attribute="foo"`.
88

9-
### CSS and Xpath selectors SHOULD be implemented in their most simple form.
9+
Instead you SHOULD use `contains(@attribute, "foo")` where `@attribute` is any valid attribute such as `@text` or `@class`.
10+
11+
### CSS and Xpath selectors SHOULD be implemented in their most simple form
1012

1113
* <span class="color:green">GOOD:</span> `#foo`
1214
* <span class="color:red">BAD:</span> `button[contains(@id, "foo")]`
1315

14-
### CSS and Xpath selectors SHOULD avoid making use of hardcoded indices. Instead you SHOULD parameterize the selector.
16+
### CSS and Xpath selectors SHOULD avoid making use of hardcoded indices
17+
18+
Instead you SHOULD parameterize the selector.
1519

1620
* <span class="color:green">GOOD:</span> `.foo:nth-of-type({{index}})`
1721
* <span class="color:red">BAD:</span> `.foo:nth-of-type(1)`
@@ -22,4 +26,4 @@ The tips and tricks below will help you to write high quality selectors.
2226
* <span class="color:green">GOOD:</span> `#actions__{{index}}__aggregator`
2327
* <span class="color:red">BAD:</span> `#actions__1__aggregator`
2428

25-
### CSS and XPath selectors MUST NOT reference the `@data-bind` attribute.
29+
### CSS and XPath selectors MUST NOT reference the `@data-bind` attribute

0 commit comments

Comments
 (0)