Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/mod.ts>Frame#select

Headless Chrome Deno API
Latest
method Frame.prototype.select
Re-export
import { Frame } from "https://deno.land/x/pptr@1.2.0/mod.ts";

Triggers a change and input event once all the provided options have been selected.

Examples

Example 1

frame.select('select#colors', 'blue'); // single selection
frame.select('select#colors', 'red', 'green', 'blue'); // multiple selections

Parameters

selector: string
  • a selector to query the frame for
...values: string[]
  • an array of values to select. If the <select> has the multiple attribute, all values are considered, otherwise only the first one is taken into account.

Returns

Promise<string[]>

the list of values that were successfully selected.