UNPKG

@o3r/testing

Version:

The module provides testing (e2e, unit test) utilities to help you build your own E2E pipeline integrating visual testing.

33 lines 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.O3rSelectElement = void 0; var tslib_1 = require("tslib"); var element_1 = require("../element"); /** * Implementation dedicated to Playwright. */ var O3rSelectElement = /** @class */ (function (_super) { tslib_1.__extends(O3rSelectElement, _super); function O3rSelectElement(sourceElement) { return _super.call(this, sourceElement) || this; } /** @inheritdoc */ O3rSelectElement.prototype.selectByIndex = function (index, _timeout) { return this.sourceElement.element.selectOption({ index: index }); }; /** @inheritdoc */ O3rSelectElement.prototype.selectByValue = function (value, _timeout) { return this.sourceElement.element.selectOption({ value: value }); }; /** @inheritDoc */ O3rSelectElement.prototype.getValue = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.sourceElement.element.locator('option:checked').inputValue()]; }); }); }; return O3rSelectElement; }(element_1.O3rElement)); exports.O3rSelectElement = O3rSelectElement; //# sourceMappingURL=select-element.js.map