You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`pageFunction` <[function]|[string]> Function to be evaluated
3055
+
-`...args` <...[Serializable]|[JSHandle]> Arguments to pass to `pageFunction`
3056
+
- returns: <[Promise]<[JSHandle]>> Promise which resolves to the return value of `pageFunction` as in-page object (JSHandle)
3057
+
3058
+
This method passes this handle as the first argument to `pageFunction`.
3059
+
3060
+
The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `executionContext.evaluateHandle` returns in-page object (JSHandle).
3061
+
3062
+
If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would wait for the promise to resolve and return its value.
3063
+
3064
+
See [Page.evaluateHandle](#pageevaluatehandlepagefunction-args) for more details.
3065
+
3033
3066
#### jsHandle.executionContext()
3034
3067
- returns: <[ExecutionContext]>
3035
3068
@@ -3190,6 +3223,34 @@ If the element is detached from DOM, the method throws an error.
3190
3223
3191
3224
The `elementHandle.dispose` method stops referencing the element handle.
-`pageFunction` <[function]|[string]> Function to be evaluated
3243
+
-`...args` <...[Serializable]|[JSHandle]> Arguments to pass to `pageFunction`
3244
+
- returns: <[Promise]<[JSHandle]>> Promise which resolves to the return value of `pageFunction` as in-page object (JSHandle)
3245
+
3246
+
This method passes this handle as the first argument to `pageFunction`.
3247
+
3248
+
The only difference between `evaluateHandle.evaluate` and `evaluateHandle.evaluateHandle` is that `executionContext.evaluateHandle` returns in-page object (JSHandle).
3249
+
3250
+
If the function passed to the `evaluateHandle.evaluateHandle` returns a [Promise], then `evaluateHandle.evaluateHandle` would wait for the promise to resolve and return its value.
3251
+
3252
+
See [Page.evaluateHandle](#pageevaluatehandlepagefunction-args) for more details.
3253
+
3193
3254
#### elementHandle.executionContext()
3194
3255
- returns: <[ExecutionContext]>
3195
3256
@@ -3257,6 +3318,18 @@ If `key` is a single character and no modifier keys besides `Shift` are being he
3257
3318
This method scrolls element into view if needed, and then uses [page.screenshot](#pagescreenshotoptions) to take a screenshot of the element.
3258
3319
If the element is detached from DOM, the method throws an error.
3259
3320
3321
+
#### elementHandle.select(...values)
3322
+
-`...values` <...[string]> Values of options to select. If the `<select>` has the `multiple` attribute, all values are considered, otherwise only the first one is taken into account.
3323
+
- returns: <[Promise]<[Array]<[string]>>> An array of option values that have been successfully selected.
3324
+
3325
+
Triggers a `change` and `input` event once all the provided options have been selected.
3326
+
If there's no `<select>` element matching `selector`, the method throws an error.
0 commit comments