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

x/fresh/tests/deps.ts>Page#select

The next-gen web framework.
Extremely Popular
Go to Latest
method Page.prototype.select
Re-export
import { Page } from "https://deno.land/x/fresh@1.6.7/tests/deps.ts";

Triggers a change and input event once all the provided options have been selected. If there's no <select> element matching selector, the method throws an error.

Examples

Example 1

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

Parameters

selector: string
...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.

Returns

Promise<string[]>