Skip to main content

Function: selectOption()

selectOption(ui5, vocabulary, label, option): Promise<IntentResult<void>>

Defined in: src/intents/core-wrappers.ts:266

Resolves a field label via vocabulary and selects an item in the matching control.

Parameters​

ui5​

UI5HandlerSlice

UI5 interaction handler.

vocabulary​

VocabLookup

Vocabulary lookup service.

label​

string

Human-readable field label (e.g. 'Purchasing Org').

option​

string

Key or visible text of the item to select.

Returns​

Promise<IntentResult<void>>

An IntentResult<void> describing the outcome.

Intent​

Select a dropdown option by business field label.

Capability​

Avoids hard-coded control IDs in test code.

Example​

import { selectOption } from '#intents/core-wrappers.js';

await selectOption(ui5, vocab, 'Purchasing Org', '1000');