Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
method Frame.prototype.select
import { Frame } from "https://deno.land/x/puppeteer@16.2.0/vendor/puppeteer-core/puppeteer/common/Frame.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.