From 13c2f6571b3c6fad2d1633e13af3d21e8f2d3b47 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 11 Mar 2020 11:39:44 -0700 Subject: [PATCH] docs(selectors): clarify selector conversions --- docs/selectors.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/selectors.md b/docs/selectors.md index c09c8c209e..1c598ec9c0 100644 --- a/docs/selectors.md +++ b/docs/selectors.md @@ -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