UNPKG

systelab-components-test

Version:

Widgets to be use in the E2E Tests based in Protractor

57 lines (56 loc) 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var widget_1 = require("./widget"); var InputField = /** @class */ (function (_super) { tslib_1.__extends(InputField, _super); function InputField() { return _super !== null && _super.apply(this, arguments) || this; } InputField.prototype.clear = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.elem.clear()]; case 1: _a.sent(); return [2 /*return*/]; } }); }); }; InputField.prototype.setText = function (text) { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.elem.sendKeys(text)]; case 1: _a.sent(); return [2 /*return*/]; } }); }); }; InputField.prototype.getText = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.elem.getAttribute('value')]; case 1: return [2 /*return*/, _a.sent()]; } }); }); }; InputField.prototype.isEnabled = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.elem.isEnabled()]; case 1: return [2 /*return*/, _a.sent()]; } }); }); }; return InputField; }(widget_1.Widget)); exports.InputField = InputField;