UNPKG

@serenity-js/web

Version:

Serenity/JS Screenplay Pattern library offering a flexible, web driver-agnostic approach for interacting with web-based user interfaces and components, suitable for various testing contexts

41 lines 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectOption = void 0; const tiny_types_1 = require("tiny-types"); /** * Describes the [`<option />`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) * elements to select. * * ## Learn more * * - [`Select`](https://serenity-js.org/api/web/class/Select/) * - [`Selected`](https://serenity-js.org/api/web/class/Selected/) * - [`PageElement.selectOptions`](https://serenity-js.org/api/web/class/PageElement/#selectOptions) * - [`PageElement.selectedOptions`](https://serenity-js.org/api/web/class/PageElement/#selectedOptions) * * @group Models */ class SelectOption extends tiny_types_1.TinyType { label; value; selected; disabled; static withLabel(label) { return new SelectOption(label); } static withValue(value) { return new SelectOption(undefined, value); } constructor(label, value, selected, disabled) { super(); this.label = label; this.value = value; this.selected = selected; this.disabled = disabled; } toString() { return `<option /> element with label: ${this.label}, value: ${this.value}`; } } exports.SelectOption = SelectOption; //# sourceMappingURL=SelectOption.js.map