@progress/kendo-e2e
Version:
Kendo UI end-to-end test utilities.
50 lines • 2.22 kB
JavaScript
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Window = void 0;
const const_1 = require("./const");
const ui_component_1 = require("./ui-component");
class Window extends ui_component_1.UIComponent {
constructor(browser, locator = Window.SELECTOR, parentElement) {
super(browser, locator, parentElement);
this.parentElement = parentElement;
}
getToolByIndex(index) {
return __awaiter(this, void 0, void 0, function* () {
const locator = `div.k-window-titlebar-actions button.k-window-titlebar-action:nth-of-type(${index})`;
return yield this.findChild(locator);
});
}
getToolByAriaLabel(label) {
return __awaiter(this, void 0, void 0, function* () {
const locator = `div.k-window-titlebar-actions button.k-window-titlebar-action[aria-label="${label}"]`;
return yield this.findChild(locator);
});
}
title() {
return __awaiter(this, void 0, void 0, function* () {
return yield this.findChild('.k-window-title');
});
}
closeButton() {
return __awaiter(this, void 0, void 0, function* () {
return yield this.findChild('button[aria-label=Close]');
});
}
content() {
return __awaiter(this, void 0, void 0, function* () {
return yield this.findChild('.k-window-content');
});
}
}
exports.Window = Window;
Window.SELECTOR = const_1.SELECTORS.WINDOW;
//# sourceMappingURL=window.js.map
;