Latest
method Frame.prototype.select
import { Frame } from "https://dotland.deno.dev/x/puppeteer@16.2.0/vendor/puppeteer-core/puppeteer/types.d.ts";

Selects a set of value on the first <select> element that matches the selector.

Examples

Example 1

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

Parameters

selector: string
  • The selector to query for.
...values: string[]
  • The 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.