MCPcopy Create free account
hub / github.com/Kong/insomnia / select

Method select

packages/insomnia-test/components/select.component.ts:40–44  ·  view source on GitHub ↗

* Opens the list and picks an option by `data-key` (string) or visible * name (RegExp). Uses a synthetic click, which is what react-aria options * inside popovers reliably respond to under test.

(keyOrName: string | RegExp)

Source from the content-addressed store, hash-verified

38 * inside popovers reliably respond to under test.
39 */
40 async select(keyOrName: string | RegExp): Promise<void> {
41 await this.open();
42 await this.option(keyOrName).dispatchEvent("click");
43 await expect(this.listbox).toBeHidden({ timeout: DEFAULT_TIMEOUT });
44 }
45
46 /** Value of the hidden native `<select>` that mirrors the selection. */
47 async nativeValue(scope: Locator = this.page.locator("body")): Promise<string> {

Callers 6

selectBodyTypeFunction · 0.95
EditableInputFunction · 0.45
GraphQLExplorerFunction · 0.45
queryXPathFunction · 0.45
runFunction · 0.45
setMethodFunction · 0.45

Calls 2

openMethod · 0.95
optionMethod · 0.95

Tested by

no test coverage detected