Skip to content

Commit de542c0

Browse files
authored
docs(api): unify selector references to include xpath (#1150)
1 parent 7682865 commit de542c0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/api.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1480,8 +1480,7 @@ This is a shortcut for [page.mainFrame().url()](#frameurl)
14801480
- returns: <[Promise]<[JSHandle]>> Promise which resolves to a JSHandle of the success value
14811481

14821482
This method behaves differently with respect to the type of the first parameter:
1483-
- if `selectorOrFunctionOrTimeout` is a `string`, then the first argument is treated as a [selector] or [xpath], depending on whether or not it starts with '//', and the method is a shortcut for
1484-
[page.waitForSelector](#pagewaitforselectorselector-options)
1483+
- if `selectorOrFunctionOrTimeout` is a `string`, then the first argument is treated as a [selector] and the method is a shortcut for [page.waitForSelector](#pagewaitforselectorselector-options)
14851484
- if `selectorOrFunctionOrTimeout` is a `function`, then the first argument is treated as a predicate to wait for and the method is a shortcut for [page.waitForFunction()](#pagewaitforfunctionpagefunction-options-args).
14861485
- if `selectorOrFunctionOrTimeout` is a `number`, then the first argument is treated as a timeout in milliseconds and the method returns a promise which resolves after the timeout
14871486
- otherwise, an exception is thrown
@@ -2135,8 +2134,7 @@ Returns frame's url.
21352134
- returns: <[Promise]<[JSHandle]>> Promise which resolves to a JSHandle of the success value
21362135

21372136
This method behaves differently with respect to the type of the first parameter:
2138-
- if `selectorOrFunctionOrTimeout` is a `string`, then the first argument is treated as a [selector] or [xpath], depending on whether or not it starts with '//', and the method is a shortcut for
2139-
[frame.waitForSelector](#framewaitforselectorselector-options)
2137+
- if `selectorOrFunctionOrTimeout` is a `string`, then the first argument is treated as a [selector] and the method is a shortcut for [frame.waitForSelector](#framewaitforselectorselector-options)
21402138
- if `selectorOrFunctionOrTimeout` is a `function`, then the first argument is treated as a predicate to wait for and the method is a shortcut for [frame.waitForFunction()](#framewaitforfunctionpagefunction-options-args).
21412139
- if `selectorOrFunctionOrTimeout` is a `number`, then the first argument is treated as a timeout in milliseconds and the method returns a promise which resolves after the timeout
21422140
- otherwise, an exception is thrown

0 commit comments

Comments
 (0)