Skip to content

Commit

Permalink
docs(selectors): clarify selector conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored Mar 11, 2020
1 parent c044227 commit 13c2f65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ document
```

For convenience, selectors in the wrong format are heuristically converted to the right format:
- selector starting with `//` is assumed to be `xpath=selector`;
- selector starting with `"` is assumed to be `text=selector`;
- otherwise selector is assumed to be `css=selector`.
- Selector starting with `//` is assumed to be `xpath=selector`. Example: `page.click('//html')` is converted to `page.click('xpath=//html')`.
- Selector starting with `"` is assumed to be `text=selector`. Example: `page.click('"foo"')` is converted to `page.click('text="foo"')`.
- Otherwise, selector is assumed to be `css=selector`. Example: `page.click('div')` is converted to `page.click('css=div')`.

## Examples

Expand Down

0 comments on commit 13c2f65

Please sign in to comment.