Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
method Frame.prototype.select
import { Frame } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/common/FrameManager.d.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.