@progress/kendo-e2e 3.4.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/components/actionsheet.d.ts +7 -0
- package/dist/components/actionsheet.js +28 -0
- package/dist/components/actionsheet.js.map +1 -0
- package/dist/components/appbar.d.ts +6 -0
- package/dist/components/appbar.js +13 -0
- package/dist/components/appbar.js.map +1 -0
- package/dist/components/arcgauge.d.ts +7 -0
- package/dist/components/arcgauge.js +37 -0
- package/dist/components/arcgauge.js.map +1 -0
- package/dist/components/autocomplete.d.ts +6 -3
- package/dist/components/autocomplete.js +6 -5
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/bottomnavigation.d.ts +8 -0
- package/dist/components/bottomnavigation.js +30 -0
- package/dist/components/bottomnavigation.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.js +46 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/calendar.d.ts +20 -0
- package/dist/components/calendar.js +89 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/captcha.d.ts +14 -0
- package/dist/components/captcha.js +65 -0
- package/dist/components/captcha.js.map +1 -0
- package/dist/components/chat.d.ts +12 -0
- package/dist/components/chat.js +58 -0
- package/dist/components/chat.js.map +1 -0
- package/dist/components/checkbox.d.ts +10 -0
- package/dist/components/checkbox.js +39 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/colorpicker.d.ts +17 -0
- package/dist/components/colorpicker.js +94 -0
- package/dist/components/colorpicker.js.map +1 -0
- package/dist/components/columnmenu.d.ts +12 -0
- package/dist/components/columnmenu.js +62 -0
- package/dist/components/columnmenu.js.map +1 -0
- package/dist/components/combobox.d.ts +7 -3
- package/dist/components/combobox.js +37 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/const.d.ts +17 -8
- package/dist/components/const.js +21 -12
- package/dist/components/const.js.map +1 -1
- package/dist/components/datepicker.d.ts +14 -0
- package/dist/components/datepicker.js +62 -0
- package/dist/components/datepicker.js.map +1 -0
- package/dist/components/daterangepicker.d.ts +18 -0
- package/dist/components/daterangepicker.js +78 -0
- package/dist/components/daterangepicker.js.map +1 -0
- package/dist/components/datetimepicker.d.ts +15 -0
- package/dist/components/datetimepicker.js +67 -0
- package/dist/components/datetimepicker.js.map +1 -0
- package/dist/components/dialog.d.ts +10 -0
- package/dist/components/dialog.js +41 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dockmanager.d.ts +12 -0
- package/dist/components/dockmanager.js +58 -0
- package/dist/components/dockmanager.js.map +1 -0
- package/dist/components/drawer.d.ts +10 -0
- package/dist/components/drawer.js +39 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown.d.ts +18 -9
- package/dist/components/dropdown.js +63 -29
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/dropdownbutton.d.ts +9 -0
- package/dist/components/dropdownbutton.js +40 -0
- package/dist/components/dropdownbutton.js.map +1 -0
- package/dist/components/dropdownlist.d.ts +9 -0
- package/dist/components/dropdownlist.js +44 -0
- package/dist/components/dropdownlist.js.map +1 -0
- package/dist/components/dropdowntree.d.ts +11 -0
- package/dist/components/dropdowntree.js +53 -0
- package/dist/components/dropdowntree.js.map +1 -0
- package/dist/components/editor.d.ts +11 -0
- package/dist/components/editor.js +70 -0
- package/dist/components/editor.js.map +1 -0
- package/dist/components/expansionpanel.d.ts +12 -0
- package/dist/components/expansionpanel.js +60 -0
- package/dist/components/expansionpanel.js.map +1 -0
- package/dist/components/filemanager.d.ts +8 -0
- package/dist/components/filemanager.js +27 -0
- package/dist/components/filemanager.js.map +1 -0
- package/dist/components/filter.d.ts +33 -0
- package/dist/components/filter.js +147 -0
- package/dist/components/filter.js.map +1 -0
- package/dist/components/filtermenu.d.ts +34 -0
- package/dist/components/filtermenu.js +99 -0
- package/dist/components/filtermenu.js.map +1 -0
- package/dist/components/flatcolorpicker.d.ts +12 -0
- package/dist/components/flatcolorpicker.js +47 -0
- package/dist/components/flatcolorpicker.js.map +1 -0
- package/dist/components/floatingactionbutton.d.ts +10 -0
- package/dist/components/floatingactionbutton.js +42 -0
- package/dist/components/floatingactionbutton.js.map +1 -0
- package/dist/components/form.d.ts +16 -0
- package/dist/components/form.js +61 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/gantt.d.ts +20 -0
- package/dist/components/gantt.js +98 -0
- package/dist/components/gantt.js.map +1 -0
- package/dist/components/gauge.d.ts +8 -0
- package/dist/components/gauge.js +31 -0
- package/dist/components/gauge.js.map +1 -0
- package/dist/components/grid.d.ts +15 -19
- package/dist/components/grid.js +32 -62
- package/dist/components/grid.js.map +1 -1
- package/dist/components/imagedditor.d.ts +30 -0
- package/dist/components/imagedditor.js +134 -0
- package/dist/components/imagedditor.js.map +1 -0
- package/dist/components/index.d.ts +68 -0
- package/dist/components/index.js +68 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/input.d.ts +14 -0
- package/dist/components/input.js +48 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/listbox.d.ts +14 -0
- package/dist/components/listbox.js +59 -0
- package/dist/components/listbox.js.map +1 -0
- package/dist/components/listview.d.ts +23 -0
- package/dist/components/listview.js +100 -0
- package/dist/components/listview.js.map +1 -0
- package/dist/components/maskedtextbox.d.ts +10 -0
- package/dist/components/maskedtextbox.js +41 -0
- package/dist/components/maskedtextbox.js.map +1 -0
- package/dist/components/mediaplayer.d.ts +22 -0
- package/dist/components/mediaplayer.js +128 -0
- package/dist/components/mediaplayer.js.map +1 -0
- package/dist/components/menu.d.ts +24 -0
- package/dist/components/menu.js +108 -0
- package/dist/components/menu.js.map +1 -0
- package/dist/components/multicolumncombobox.d.ts +8 -0
- package/dist/components/multicolumncombobox.js +36 -0
- package/dist/components/multicolumncombobox.js.map +1 -0
- package/dist/components/multiselect.d.ts +12 -0
- package/dist/components/multiselect.js +55 -0
- package/dist/components/multiselect.js.map +1 -0
- package/dist/components/numerictextbox.d.ts +12 -0
- package/dist/components/numerictextbox.js +57 -0
- package/dist/components/numerictextbox.js.map +1 -0
- package/dist/components/pager.d.ts +19 -4
- package/dist/components/pager.js +69 -11
- package/dist/components/pager.js.map +1 -1
- package/dist/components/panelbar.d.ts +16 -0
- package/dist/components/panelbar.js +72 -0
- package/dist/components/panelbar.js.map +1 -0
- package/dist/components/pdfviewer.d.ts +16 -0
- package/dist/components/pdfviewer.js +68 -0
- package/dist/components/pdfviewer.js.map +1 -0
- package/dist/components/pivotgrid-legacy.d.ts +91 -0
- package/dist/components/pivotgrid-legacy.js +447 -0
- package/dist/components/pivotgrid-legacy.js.map +1 -0
- package/dist/components/pivotgrid.d.ts +79 -0
- package/dist/components/pivotgrid.js +405 -0
- package/dist/components/pivotgrid.js.map +1 -0
- package/dist/components/popup.d.ts +1 -1
- package/dist/components/progressbar.d.ts +8 -0
- package/dist/components/progressbar.js +28 -0
- package/dist/components/progressbar.js.map +1 -0
- package/dist/components/radiobutton.d.ts +10 -0
- package/dist/components/radiobutton.js +39 -0
- package/dist/components/radiobutton.js.map +1 -0
- package/dist/components/rating.d.ts +11 -0
- package/dist/components/rating.js +43 -0
- package/dist/components/rating.js.map +1 -0
- package/dist/components/scheduler.d.ts +35 -0
- package/dist/components/scheduler.js +142 -0
- package/dist/components/scheduler.js.map +1 -0
- package/dist/components/scrollview.d.ts +15 -0
- package/dist/components/scrollview.js +63 -0
- package/dist/components/scrollview.js.map +1 -0
- package/dist/components/signature.d.ts +15 -0
- package/dist/components/signature.js +47 -0
- package/dist/components/signature.js.map +1 -0
- package/dist/components/slider.d.ts +13 -0
- package/dist/components/slider.js +53 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/splitbutton.d.ts +17 -0
- package/dist/components/splitbutton.js +80 -0
- package/dist/components/splitbutton.js.map +1 -0
- package/dist/components/splitter.d.ts +14 -0
- package/dist/components/splitter.js +64 -0
- package/dist/components/splitter.js.map +1 -0
- package/dist/components/spreadsheet.d.ts +19 -0
- package/dist/components/spreadsheet.js +48 -0
- package/dist/components/spreadsheet.js.map +1 -0
- package/dist/components/stepper.d.ts +11 -0
- package/dist/components/stepper.js +45 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +10 -0
- package/dist/components/switch.js +40 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +57 -0
- package/dist/components/table.js +237 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabstrip.d.ts +18 -0
- package/dist/components/tabstrip.js +73 -0
- package/dist/components/tabstrip.js.map +1 -0
- package/dist/components/textbox.d.ts +15 -0
- package/dist/components/textbox.js +69 -0
- package/dist/components/textbox.js.map +1 -0
- package/dist/components/tilelayout.d.ts +11 -0
- package/dist/components/tilelayout.js +39 -0
- package/dist/components/tilelayout.js.map +1 -0
- package/dist/components/timedurationpicker.d.ts +27 -0
- package/dist/components/timedurationpicker.js +146 -0
- package/dist/components/timedurationpicker.js.map +1 -0
- package/dist/components/timeline.d.ts +27 -0
- package/dist/components/timeline.js +150 -0
- package/dist/components/timeline.js.map +1 -0
- package/dist/components/timepicker.d.ts +19 -0
- package/dist/components/timepicker.js +97 -0
- package/dist/components/timepicker.js.map +1 -0
- package/dist/components/toolbar.d.ts +11 -0
- package/dist/components/toolbar.js +34 -0
- package/dist/components/toolbar.js.map +1 -0
- package/dist/components/treelist.d.ts +13 -0
- package/dist/components/treelist.js +51 -0
- package/dist/components/treelist.js.map +1 -0
- package/dist/components/treeview.d.ts +16 -0
- package/dist/components/treeview.js +113 -0
- package/dist/components/treeview.js.map +1 -0
- package/dist/components/ui-component.d.ts +3 -1
- package/dist/components/ui-component.js +16 -0
- package/dist/components/ui-component.js.map +1 -1
- package/dist/components/upload.d.ts +20 -0
- package/dist/components/upload.js +99 -0
- package/dist/components/upload.js.map +1 -0
- package/dist/components/window.d.ts +12 -0
- package/dist/components/window.js +50 -0
- package/dist/components/window.js.map +1 -0
- package/dist/components/wizard.d.ts +12 -0
- package/dist/components/wizard.js +31 -0
- package/dist/components/wizard.js.map +1 -0
- package/dist/selenium/browser.d.ts +2 -1
- package/dist/selenium/browser.js +3 -2
- package/dist/selenium/browser.js.map +1 -1
- package/dist/selenium/web-app.d.ts +2 -0
- package/dist/selenium/web-app.js +28 -1
- package/dist/selenium/web-app.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UIComponent } from "./ui-component";
|
|
2
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
3
|
+
export declare class DateRangePicker extends UIComponent {
|
|
4
|
+
protected parentElement?: WebElement | By | string;
|
|
5
|
+
static SELECTOR: string;
|
|
6
|
+
constructor(browser: Browser, locator?: string, parentElement?: WebElement | By | string);
|
|
7
|
+
startInput(): Promise<WebElement>;
|
|
8
|
+
endInput(): Promise<WebElement>;
|
|
9
|
+
startInputValue(): Promise<string>;
|
|
10
|
+
endInputValue(): Promise<string>;
|
|
11
|
+
typeInStartInput(text: string, { typeFromBeginning }?: {
|
|
12
|
+
typeFromBeginning?: boolean;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
typeInEndInput(text: string, { typeFromBeginning }?: {
|
|
15
|
+
typeFromBeginning?: boolean;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
private type;
|
|
18
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DateRangePicker = void 0;
|
|
13
|
+
const ui_component_1 = require("./ui-component");
|
|
14
|
+
const selenium_1 = require("../selenium");
|
|
15
|
+
const const_1 = require("./const");
|
|
16
|
+
class DateRangePicker extends ui_component_1.UIComponent {
|
|
17
|
+
constructor(browser, locator = DateRangePicker.SELECTOR, parentElement) {
|
|
18
|
+
super(browser, locator, parentElement);
|
|
19
|
+
this.parentElement = parentElement;
|
|
20
|
+
}
|
|
21
|
+
startInput() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const jquery = '.k-input-inner[data-input="start"]';
|
|
24
|
+
const angular = '.k-input-inner[id*=start]';
|
|
25
|
+
const blazor = '.k-floating-label-container:nth-of-type(1) .k-dateinput .k-input-inner';
|
|
26
|
+
return yield this.findChild(`${jquery},${angular},${blazor}`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
endInput() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const jquery = '.k-input-inner[data-input="end"]';
|
|
32
|
+
const angular = '.k-input-inner[id*=end]';
|
|
33
|
+
const blazor = '.k-floating-label-container:nth-of-type(2) .k-dateinput .k-input-inner';
|
|
34
|
+
return yield this.findChild(`${jquery},${angular},${blazor}`);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
startInputValue() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return yield (yield this.startInput()).getAttribute('value');
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
endInputValue() {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return yield (yield this.endInput()).getAttribute('value');
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
typeInStartInput(text, { typeFromBeginning = false } = {}) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const input = yield this.startInput();
|
|
50
|
+
yield this.type(input, text, { typeFromBeginning: typeFromBeginning });
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
typeInEndInput(text, { typeFromBeginning = false } = {}) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const input = yield this.endInput();
|
|
56
|
+
yield this.type(input, text, { typeFromBeginning: typeFromBeginning });
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
type(input, text, { typeFromBeginning = false } = {}) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
if (typeFromBeginning) {
|
|
62
|
+
const rect = yield input.getRect();
|
|
63
|
+
yield this.browser.driver.actions({ async: false, bridge: true })
|
|
64
|
+
.move({ origin: input, x: 5 - rect.width / 2, y: 5 - rect.height / 2 })
|
|
65
|
+
.click()
|
|
66
|
+
.perform();
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
yield input.click();
|
|
70
|
+
}
|
|
71
|
+
yield this.browser.wait(selenium_1.EC.hasFocus(input), { timeout: 3000, message: 'Failed to focus input.' });
|
|
72
|
+
yield this.browser.sendKey(text);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
DateRangePicker.SELECTOR = const_1.SELECTORS.DATERANGEPICKER;
|
|
77
|
+
exports.DateRangePicker = DateRangePicker;
|
|
78
|
+
//# sourceMappingURL=daterangepicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daterangepicker.js","sourceRoot":"","sources":["../../src/components/daterangepicker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA6C;AAC7C,0CAA0D;AAC1D,mCAAoC;AAEpC,MAAa,eAAgB,SAAQ,0BAAW;IAG5C,YAAY,OAAgB,EAAE,OAAO,GAAG,eAAe,CAAC,QAAQ,EAAY,aAAwC;QAChH,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;Q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AAK,EAAE,IAAI,EAAE,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC3E,CAAC;KAAA;IAEa,IAAI,CAAC,KAAiB,EAAE,IAAY,EAAE,EAAE,iBAAiB,GAAG,KAAK,EAAE,GAAG,EAAE;;YAClF,IAAI,iBAAiB,EAAE;gBACnB,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;gBACnC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;qBAC5D,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;qBACtE,KAAK,EAAE;qBACP,OAAO,EAAE,CAAC;aAClB;iBAAM;gBACH,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;aACvB;YAED,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC,CAAC;YAClG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;KAAA;;AAnDa,wBAAQ,GAAG,iBAAS,CAAC,eAAe,CAAC;AAD1C,0CAAe"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UIComponent } from "./ui-component";
|
|
2
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
3
|
+
export declare class DateTimePicker extends UIComponent {
|
|
4
|
+
protected parentElement?: WebElement | By | string;
|
|
5
|
+
static SELECTOR: string;
|
|
6
|
+
constructor(browser: Browser, locator?: By | string, parentElement?: WebElement | By | string);
|
|
7
|
+
input(): Promise<WebElement>;
|
|
8
|
+
inputValue(): Promise<string>;
|
|
9
|
+
dateButton(): Promise<WebElement>;
|
|
10
|
+
timeButton(): Promise<WebElement>;
|
|
11
|
+
type(text: string, { typeFromBeginning, clear }?: {
|
|
12
|
+
typeFromBeginning?: boolean;
|
|
13
|
+
clear?: boolean;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DateTimePicker = void 0;
|
|
13
|
+
const ui_component_1 = require("./ui-component");
|
|
14
|
+
const selenium_1 = require("../selenium");
|
|
15
|
+
const const_1 = require("./const");
|
|
16
|
+
class DateTimePicker extends ui_component_1.UIComponent {
|
|
17
|
+
constructor(browser, locator = DateTimePicker.SELECTOR, parentElement) {
|
|
18
|
+
super(browser, locator, parentElement);
|
|
19
|
+
this.parentElement = parentElement;
|
|
20
|
+
}
|
|
21
|
+
input() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return yield this.findChild('input.k-input-inner');
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
inputValue() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield (yield this.input()).getAttribute('value');
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
dateButton() {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return yield this.findChild('.k-button:nth-of-type(1)');
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
timeButton() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return yield this.findChild('.k-button:nth-of-type(2)');
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
type(text, { typeFromBeginning = true, clear = false } = {}) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const input = yield this.input();
|
|
44
|
+
if (typeFromBeginning) {
|
|
45
|
+
const rect = yield input.getRect();
|
|
46
|
+
yield this.browser.driver.actions({ async: false, bridge: true })
|
|
47
|
+
.move({ origin: input, x: 3 - rect.width / 2, y: 3 - rect.height / 2 })
|
|
48
|
+
.click()
|
|
49
|
+
.perform();
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
yield input.click();
|
|
53
|
+
}
|
|
54
|
+
yield this.browser.wait(selenium_1.EC.hasFocus(input), { timeout: 3000, message: 'Failed to focus input.' });
|
|
55
|
+
if (clear) {
|
|
56
|
+
yield this.browser.sendControlKeyCombination('a');
|
|
57
|
+
yield this.browser.sleep(10);
|
|
58
|
+
yield this.browser.sendKey(selenium_1.Key.BACK_SPACE);
|
|
59
|
+
yield this.browser.sleep(10);
|
|
60
|
+
}
|
|
61
|
+
yield this.browser.sendKey(text);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
DateTimePicker.SELECTOR = const_1.SELECTORS.DATETIMEPICKER;
|
|
66
|
+
exports.DateTimePicker = DateTimePicker;
|
|
67
|
+
//# sourceMappingURL=datetimepicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datetimepicker.js","sourceRoot":"","sources":["../../src/components/datetimepicker.ts"],"names":[],"mappings":";;;;;;;;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AAE;qBACP,OAAO,EAAE,CAAC;aAClB;iBAAM;gBACH,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;aACvB;YAED,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC,CAAC;YAClG,IAAI,KAAK,EAAE;gBACP,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBAClD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC7B,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,cAAG,CAAC,UAAU,CAAC,CAAC;gBAC3C,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;aAChC;YAED,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;KAAA;;AA3Ca,uBAAQ,GAAG,iBAAS,CAAC,cAAc,CAAC;AADzC,wCAAc"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UIComponent } from "./ui-component";
|
|
2
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
3
|
+
export declare class Dialog extends UIComponent {
|
|
4
|
+
protected parentElement?: WebElement | By | string;
|
|
5
|
+
static SELECTOR: string;
|
|
6
|
+
constructor(browser: Browser, locator?: string, parentElement?: WebElement | By | string);
|
|
7
|
+
getActionButtonByIndex(index: number): Promise<WebElement>;
|
|
8
|
+
getTitle(): Promise<WebElement>;
|
|
9
|
+
getContent(): Promise<WebElement>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Dialog = void 0;
|
|
13
|
+
const ui_component_1 = require("./ui-component");
|
|
14
|
+
class Dialog extends ui_component_1.UIComponent {
|
|
15
|
+
constructor(browser, locator = Dialog.SELECTOR, parentElement) {
|
|
16
|
+
super(browser, locator, parentElement);
|
|
17
|
+
this.parentElement = parentElement;
|
|
18
|
+
}
|
|
19
|
+
getActionButtonByIndex(index) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const locator = 'div.k-dialog-actions > .k-button';
|
|
22
|
+
yield this.browser.wait(() => __awaiter(this, void 0, void 0, function* () { return (yield this.findChildren(locator)).length > index; }), {
|
|
23
|
+
message: `Failed to find button with index ${index}`
|
|
24
|
+
});
|
|
25
|
+
return (yield this.findChildren(locator))[index];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
getTitle() {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield this.findChild('.k-dialog-title');
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
getContent() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return yield this.findChild('.k-window-content');
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
Dialog.SELECTOR = '.k-dialog';
|
|
40
|
+
exports.Dialog = Dialog;
|
|
41
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/components/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA6C;AAG7C,MAAa,MAAO,SAAQ,0BAAW;IAGnC,YAAY,OAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAY,aAAwC;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;QADwB,kBAAa,GAAb,aAAa,CAA2B;IAE3G,CAAC;IAEK,sBAAsB,CAAC,KAAa;;YACtC,MAAM,OAAO,GAAG,kCAAkC,CAAC;YACnD,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAS,EAAE,gDAAC,OAAA,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAA,GAAA,EAAE;gBACnF,OAAO,EAAE,oCAAoC,KAAK,EAAE;aACvD,CAAC,CAAC;YAEH,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;KAAA;IAEK,QAAQ;;YACV,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QACnD,CAAC;KAAA;IAEK,UAAU;;YACZ,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACrD,CAAC;KAAA;;AArBa,eAAQ,GAAG,WAAW,CAAC;AAD5B,wBAAM"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UIComponent } from "./ui-component";
|
|
2
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
3
|
+
export declare class DockManager extends UIComponent {
|
|
4
|
+
protected parentElement?: WebElement | By | string;
|
|
5
|
+
static SELECTOR: string;
|
|
6
|
+
constructor(browser: Browser, locator?: string, parentElement?: WebElement | By | string);
|
|
7
|
+
clickToolbarButton(buttonIndex: number): Promise<void>;
|
|
8
|
+
pin(paneTitle: string): Promise<void>;
|
|
9
|
+
unpin(paneTitle: string): Promise<void>;
|
|
10
|
+
isDockNavigatorDisplayed(): Promise<boolean>;
|
|
11
|
+
dragPane(headerSelector: string, paneSelector: string): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DockManager = void 0;
|
|
13
|
+
const ui_component_1 = require("./ui-component");
|
|
14
|
+
const selenium_1 = require("../selenium");
|
|
15
|
+
class DockManager extends ui_component_1.UIComponent {
|
|
16
|
+
constructor(browser, locator = DockManager.SELECTOR, parentElement) {
|
|
17
|
+
super(browser, locator, parentElement);
|
|
18
|
+
this.parentElement = parentElement;
|
|
19
|
+
}
|
|
20
|
+
clickToolbarButton(buttonIndex) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const button = yield this.findChild(`.k-dock-manager-toolbar > button:nth-of-type(${buttonIndex})`);
|
|
23
|
+
yield button.click();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
pin(paneTitle) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const selector = `.//div[@class="k-pane-header" and ./*[@class="k-pane-title" and .="${paneTitle}"]]//button[@data-action="pin"]`;
|
|
29
|
+
yield (yield this.findChild(selenium_1.By.xpath(selector))).click();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
unpin(paneTitle) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const selector = `.//div[@class="k-pane-header" and ./*[@class="k-pane-title" and .="${paneTitle}"]]//button[@data-action="unpin"]`;
|
|
35
|
+
yield (yield this.findChild(selenium_1.By.xpath(selector))).click();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
isDockNavigatorDisplayed() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const navigator = yield this.findChild('.k-dock-navigator');
|
|
41
|
+
return yield navigator.isDisplayed();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
dragPane(headerSelector, paneSelector) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const pane = yield this.browser.find(paneSelector);
|
|
47
|
+
const element = yield this.browser.find(headerSelector);
|
|
48
|
+
yield this.browser.driver.actions({ async: false, bridge: false })
|
|
49
|
+
.move({ origin: element }).pause(100)
|
|
50
|
+
.press().pause(100)
|
|
51
|
+
.move({ origin: pane }).pause(100)
|
|
52
|
+
.release().perform();
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
DockManager.SELECTOR = ".k-dock-manager";
|
|
57
|
+
exports.DockManager = DockManager;
|
|
58
|
+
//# sourceMappingURL=dockmanager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dockmanager.js","sourceRoot":"","sources":["../../src/components/dockmanager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA6C;AAC7C,0CAAsD;AAEtD,MAAa,WAAY,SAAQ,0BAAW;IAGxC,YAAY,OAAgB,EAAE,OAAO,GAAG,WAAW,CAAC,QAAQ,EAAY,aAAwC;QAC5G,KAAK,CAAC,OAAO,EAAE,OAA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AAC,CAAC,KAAK,CAAC,GAAG,CAAC;iBACpC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;iBAClB,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;iBACjC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,CAAC;KAAA;;AAlCa,oBAAQ,GAAG,iBAAiB,CAAC;AADlC,kCAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UIComponent } from "./ui-component";
|
|
2
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
3
|
+
export declare class Drawer extends UIComponent {
|
|
4
|
+
protected parentElement?: WebElement | By | string;
|
|
5
|
+
static SELECTOR: string;
|
|
6
|
+
constructor(browser: Browser, locator?: string, parentElement?: WebElement | By | string);
|
|
7
|
+
content(): Promise<WebElement>;
|
|
8
|
+
getItemByIndex(index: number): Promise<WebElement>;
|
|
9
|
+
getItemByText(text: string): Promise<WebElement>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Drawer = void 0;
|
|
13
|
+
const ui_component_1 = require("./ui-component");
|
|
14
|
+
const selenium_1 = require("../selenium");
|
|
15
|
+
const const_1 = require("./const");
|
|
16
|
+
class Drawer extends ui_component_1.UIComponent {
|
|
17
|
+
constructor(browser, locator = Drawer.SELECTOR, parentElement) {
|
|
18
|
+
super(browser, locator, parentElement);
|
|
19
|
+
this.parentElement = parentElement;
|
|
20
|
+
}
|
|
21
|
+
content() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return yield this.findChild(".k-drawer-content");
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
getItemByIndex(index) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield this.findChild(`.k-drawer-wrapper li.k-drawer-item:nth-of-type(${index})`);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getItemByText(text) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return yield this.findChild(selenium_1.By.xpath(`.//*[@class='k-drawer-wrapper']//li[.='${text}']`));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
Drawer.SELECTOR = const_1.SELECTORS.DRAWER;
|
|
38
|
+
exports.Drawer = Drawer;
|
|
39
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/components/drawer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA6C;AAC7C,0CAAsD;AACtD,mCAAoC;AAEpC,MAAa,MAAO,SAAQ,0BAAW;IAGnC,YAAY,OAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAY,aAAwC;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;QADwB,kBAAa,GAAb,aAAa,CAA2B;IAE3G,CAAC;IAEK,OAAO;;YACT,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACrD,CAAC;KAAA;IAEK,cAAc,CAAC,KAAa;;YAC9B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,kDAAkD,KAAK,GAAG,CAAC,CAAC;QAC5F,CAAC;KAAA;IAEK,aAAa,CAAC,IAAY;;YAC5B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,aAAE,CAAC,KAAK,CAAC,0CAA0C,IAAI,IAAI,CAAC,CAAC,CAAC;QAC9F,CAAC;KAAA;;AAhBa,eAAQ,GAAG,iBAAS,CAAC,MAAM,CAAC;AADjC,wBAAM"}
|
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
import { Browser, By, WebElement } from "../selenium
|
|
1
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
2
2
|
import { UIComponent } from "./ui-component";
|
|
3
3
|
export declare abstract class DropDown extends UIComponent {
|
|
4
4
|
static INPUT: string;
|
|
5
5
|
static CLEAR_VALUE: string;
|
|
6
6
|
static SELECT: string;
|
|
7
|
-
constructor(browser: Browser, locator: string, rootElement?: WebElement);
|
|
7
|
+
constructor(browser: Browser, locator: By | string, rootElement?: WebElement);
|
|
8
8
|
popupSelector(): Promise<By>;
|
|
9
9
|
popup(): Promise<WebElement>;
|
|
10
10
|
input(): Promise<WebElement>;
|
|
11
11
|
clear(): Promise<WebElement>;
|
|
12
|
-
|
|
12
|
+
clearValue(): Promise<void>;
|
|
13
|
+
getChips({ waitForChip }?: {
|
|
14
|
+
waitForChip?: boolean;
|
|
15
|
+
}): Promise<WebElement[]>;
|
|
13
16
|
select(): Promise<WebElement>;
|
|
14
17
|
expand(): Promise<void>;
|
|
15
18
|
waitToExpand(): Promise<void>;
|
|
16
19
|
waitToCollapse(): Promise<void>;
|
|
17
20
|
getText(): Promise<string>;
|
|
18
21
|
getValue(): Promise<string>;
|
|
19
|
-
getItems({
|
|
20
|
-
|
|
22
|
+
getItems({ waitForItems }?: {
|
|
23
|
+
waitForItems?: boolean;
|
|
21
24
|
}): Promise<WebElement[]>;
|
|
22
25
|
getSelectedItem(): Promise<WebElement>;
|
|
23
26
|
getFocusedItem(): Promise<WebElement>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
selectItemByIndex(index: number
|
|
27
|
-
|
|
27
|
+
getItemByIndex(index: number): Promise<WebElement>;
|
|
28
|
+
getItemByText(text: string): Promise<WebElement>;
|
|
29
|
+
selectItemByIndex(index: number, { expand, waitToCollapse }?: {
|
|
30
|
+
expand?: boolean;
|
|
31
|
+
waitToCollapse?: boolean;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
selectItemByText(text: string, { expand, waitToCollapse }?: {
|
|
34
|
+
expand?: boolean;
|
|
35
|
+
waitToCollapse?: boolean;
|
|
36
|
+
}): Promise<void>;
|
|
28
37
|
isPopupEmpty(): Promise<boolean>;
|
|
29
38
|
isEnabled(): Promise<boolean>;
|
|
30
39
|
}
|
|
@@ -10,8 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DropDown = void 0;
|
|
13
|
-
const
|
|
14
|
-
const conditions_1 = require("../selenium/conditions");
|
|
13
|
+
const selenium_1 = require("../selenium");
|
|
15
14
|
const const_1 = require("./const");
|
|
16
15
|
const ui_component_1 = require("./ui-component");
|
|
17
16
|
class DropDown extends ui_component_1.UIComponent {
|
|
@@ -29,11 +28,7 @@ class DropDown extends ui_component_1.UIComponent {
|
|
|
29
28
|
const childAriaControls = yield this.findChild("[aria-controls]");
|
|
30
29
|
id = (yield childAriaControls.getAttribute("aria-controls")).split("_")[0];
|
|
31
30
|
}
|
|
32
|
-
//
|
|
33
|
-
// For DropDownTree "id" is set on child TreeView component.
|
|
34
|
-
// For DropDownList "id" is set on .k-popup.
|
|
35
|
-
// This expression satisfy both.
|
|
36
|
-
return browser_1.By.xpath(`//div[@class="k-child-animation-container"]//div[contains(@id, "${id}")]`);
|
|
31
|
+
return selenium_1.By.xpath(`//div[contains(@class, "k-animation-container")]//div[contains(@id, "${id}")]/../../*[contains(@class, "k-popup")]`);
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
34
|
popup() {
|
|
@@ -52,9 +47,14 @@ class DropDown extends ui_component_1.UIComponent {
|
|
|
52
47
|
return this.findChild(DropDown.CLEAR_VALUE);
|
|
53
48
|
});
|
|
54
49
|
}
|
|
55
|
-
|
|
50
|
+
clearValue() {
|
|
56
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
|
|
52
|
+
yield (yield this.clear()).click();
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
getChips({ waitForChip = true } = {}) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
return this.findChildren(const_1.SELECTORS.CHIP, { waitForChild: waitForChip });
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
select() {
|
|
@@ -66,27 +66,39 @@ class DropDown extends ui_component_1.UIComponent {
|
|
|
66
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
67
|
let expander;
|
|
68
68
|
const root = yield this.root();
|
|
69
|
-
|
|
69
|
+
const cssClass = yield root.getAttribute('class');
|
|
70
|
+
const isDropDownButton = cssClass.includes('k-dropdown-button');
|
|
71
|
+
const isMultiSelect = cssClass.includes('k-multiselect');
|
|
72
|
+
const isMultiSelectable = (yield root.getAttribute("aria-multiselectable")) === "true";
|
|
73
|
+
if (isDropDownButton || isMultiSelect || isMultiSelectable) {
|
|
70
74
|
expander = root;
|
|
71
75
|
}
|
|
72
76
|
else {
|
|
73
77
|
expander = yield this.select();
|
|
74
78
|
}
|
|
75
|
-
|
|
79
|
+
try {
|
|
80
|
+
yield expander.click();
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
if (e.name === 'ElementClickInterceptedError') {
|
|
84
|
+
yield this.browser.sleep(500);
|
|
85
|
+
yield expander.click();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
76
88
|
yield this.waitToExpand();
|
|
77
89
|
});
|
|
78
90
|
}
|
|
79
91
|
waitToExpand() {
|
|
80
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
93
|
const popup = yield this.popupSelector();
|
|
82
|
-
yield this.browser.wait(
|
|
94
|
+
yield this.browser.wait(selenium_1.EC.isVisible(popup), { timeout: 5000, message: "Failed to expand popup." });
|
|
83
95
|
yield this.browser.waitForAnimation(popup, { timeout: 3000, pollTimeout: 50 });
|
|
84
96
|
});
|
|
85
97
|
}
|
|
86
98
|
waitToCollapse() {
|
|
87
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
100
|
const popup = yield this.popupSelector();
|
|
89
|
-
yield this.browser.wait(
|
|
101
|
+
yield this.browser.wait(selenium_1.EC.notVisible(popup), { timeout: 5000, message: "Failed to collapse popup." });
|
|
90
102
|
yield this.browser.sleep(100); // Wait for animation timeout
|
|
91
103
|
});
|
|
92
104
|
}
|
|
@@ -97,13 +109,13 @@ class DropDown extends ui_component_1.UIComponent {
|
|
|
97
109
|
}
|
|
98
110
|
getValue() {
|
|
99
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
const input = yield this.
|
|
112
|
+
const input = yield this.input();
|
|
101
113
|
return yield input.getAttribute("value");
|
|
102
114
|
});
|
|
103
115
|
}
|
|
104
|
-
getItems({
|
|
116
|
+
getItems({ waitForItems = true } = {}) {
|
|
105
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
return yield this.browser.findChildren(yield this.popupSelector(), "li", { waitForChild:
|
|
118
|
+
return yield this.browser.findChildren(yield this.popupSelector(), "li", { waitForChild: waitForItems });
|
|
107
119
|
});
|
|
108
120
|
}
|
|
109
121
|
getSelectedItem() {
|
|
@@ -116,34 +128,56 @@ class DropDown extends ui_component_1.UIComponent {
|
|
|
116
128
|
return yield this.browser.findChild(yield this.popupSelector(), "li.k-focus");
|
|
117
129
|
});
|
|
118
130
|
}
|
|
119
|
-
|
|
131
|
+
getItemByIndex(index) {
|
|
120
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
return (yield this.browser.findChildren(yield this.popupSelector(), "li
|
|
133
|
+
return (yield this.browser.findChildren(yield this.popupSelector(), "li"))[index];
|
|
122
134
|
});
|
|
123
135
|
}
|
|
124
|
-
|
|
136
|
+
getItemByText(text) {
|
|
125
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
return yield this.browser.findChild(yield this.popupSelector(),
|
|
138
|
+
return yield this.browser.findChild(yield this.popupSelector(), selenium_1.By.xpath(`.//li[.="${text}"]`));
|
|
127
139
|
});
|
|
128
140
|
}
|
|
129
|
-
selectItemByIndex(index) {
|
|
141
|
+
selectItemByIndex(index, { expand = true, waitToCollapse = true } = {}) {
|
|
130
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
if (expand) {
|
|
144
|
+
yield this.expand();
|
|
145
|
+
}
|
|
146
|
+
yield (yield this.getItemByIndex(index)).click();
|
|
147
|
+
if (waitToCollapse) {
|
|
148
|
+
yield this.waitToCollapse();
|
|
149
|
+
}
|
|
134
150
|
});
|
|
135
151
|
}
|
|
136
|
-
selectItemByText(text) {
|
|
152
|
+
selectItemByText(text, { expand = true, waitToCollapse = true } = {}) {
|
|
137
153
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
154
|
+
if (expand) {
|
|
155
|
+
yield this.expand();
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
yield (yield this.getItemByText(text)).click();
|
|
159
|
+
}
|
|
160
|
+
catch (e) {
|
|
161
|
+
if (e.name === 'StaleElementReferenceError') {
|
|
162
|
+
yield this.browser.sleep(500);
|
|
163
|
+
yield (yield this.getItemByText(text)).click();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (waitToCollapse) {
|
|
167
|
+
yield this.waitToCollapse();
|
|
168
|
+
}
|
|
141
169
|
});
|
|
142
170
|
}
|
|
143
171
|
isPopupEmpty() {
|
|
144
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
173
|
const popup = yield this.popup();
|
|
146
|
-
|
|
174
|
+
const noDateItems = yield popup.findElements(selenium_1.By.css(".k-no-data"));
|
|
175
|
+
if (noDateItems.length > 0) {
|
|
176
|
+
return noDateItems[0].isDisplayed();
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
147
181
|
});
|
|
148
182
|
}
|
|
149
183
|
isEnabled() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/components/dropdown.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/components/dropdown.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA0D;AAC1D,mCAA4C;AAC5C,iDAA6C;AAE7C,MAAsB,QAAS,SAAQ,0BAAW;IAK9C,YAAY,OAAgB,EAAE,OAAoB,EAAE,WAAwB;QACxE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IACzC,CAAC;IAEY,aAAa;;YACtB,IAAI,EAAU,CAAC;YACf,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;YACjF,IAAI,gBAAgB,KAAK,IAAI,EAAE;gBAC3B,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACvC;iBAAM;gBACH,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;gBAClE,EAAE,GAAG,CAAC,MAAM,iBAAiB,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9E;YAED,OAAO,aAAE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AS,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAClE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;YACvE,MAAM,iBAAiB,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAM,CAAC,QAAQ,CAAC,CAAC;YAC/D,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE,CAAC;YAClD,OAAO,iBAAiB,IAAI,iBAAiB,CAAC;QAClD,CAAC;KAAA;;AA/Ja,cAAK,GAAG,gBAAgB,CAAC;AACzB,oBAAW,GAAG,gBAAgB,CAAC;AAC/B,eAAM,GAAG,iBAAiB,CAAC;AAHvB,4BAAQ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Browser, By, WebElement } from "../selenium";
|
|
2
|
+
import { DropDown } from "./dropdown";
|
|
3
|
+
export declare class DropDownButton extends DropDown {
|
|
4
|
+
static SELECTOR: string;
|
|
5
|
+
constructor(browser: Browser, locator?: string, rootElement?: WebElement);
|
|
6
|
+
popupSelector(): Promise<By>;
|
|
7
|
+
expand(): Promise<void>;
|
|
8
|
+
icon(): Promise<WebElement>;
|
|
9
|
+
}
|