sidebar_label |
---|
Frame.select |
Selects a set of value on the first <select>
element that matches the selector
.
class Frame {
select(selector: string, ...values: string[]): Promise<string[]>;
}
Parameter |
Type |
Description |
---|---|---|
selector |
string |
The selector to query for. |
values |
string[] |
The array of values to select. If the |
Promise<string[]>
the list of values that were successfully selected.
Throws if there's no <select>
matching selector
.
frame.select('select#colors', 'blue'); // single selection
frame.select('select#colors', 'red', 'green', 'blue'); // multiple selections