@winning-test/component 0.0.73 → 0.0.75
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/acis60/component/BlockComponent.js +233 -0
- package/acis60/component/ButtonComponent.js +23 -0
- package/acis60/component/CascaderComponent.js +51 -0
- package/acis60/component/CheckboxComponent.js +46 -0
- package/acis60/component/Component.js +99 -0
- package/acis60/component/DialogComponent.js +26 -0
- package/acis60/component/InputComponent.js +31 -0
- package/acis60/component/LeftMenuComponent.js +78 -0
- package/acis60/component/ListComponent.js +52 -0
- package/acis60/component/MessageComponent.js +57 -0
- package/acis60/component/RadioComponent.js +41 -0
- package/acis60/component/SelectComponent.js +74 -0
- package/acis60/component/SwitchComponent.js +48 -0
- package/acis60/component/TableComponent.js +94 -0
- package/acis60/component/TextComponent.js +23 -0
- package/acis60/page/Page.js +187 -0
- package/acis60/test/component.test.js +17 -0
- package/acis60/test/component.test.json +24 -0
- package/mdm60/component/BlockComponent.js +233 -0
- package/mdm60/component/ButtonComponent.js +23 -0
- package/mdm60/component/CascaderComponent.js +51 -0
- package/mdm60/component/CheckboxComponent.js +46 -0
- package/mdm60/component/Component.js +113 -0
- package/mdm60/component/DialogComponent.js +26 -0
- package/mdm60/component/InputComponent.js +31 -0
- package/mdm60/component/LeftMenuComponent.js +78 -0
- package/mdm60/component/ListComponent.js +52 -0
- package/mdm60/component/MessageComponent.js +57 -0
- package/mdm60/component/RadioComponent.js +41 -0
- package/mdm60/component/SelectComponent.js +74 -0
- package/mdm60/component/SwitchComponent.js +48 -0
- package/mdm60/component/TableComponent.js +94 -0
- package/mdm60/component/TextComponent.js +23 -0
- package/mdm60/page/Page.js +171 -0
- package/mdm60/test/component.test.js +26 -0
- package/mdm60/test/component.test.json +15 -0
- package/package.json +3 -3
- package/winex-region/component/MessageComponent.js +1 -1
- package/winex60/component/Component.js +4 -8
- package/winex60/component/MessageComponent.js +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 单选框组件类
|
|
3
|
+
* @作者 MaoJJ
|
|
4
|
+
*/
|
|
5
|
+
class RadioComponent extends require("./Component") {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 单选框组件
|
|
9
|
+
* @param {Browser} browser 浏览器
|
|
10
|
+
* @param {String} label 标签
|
|
11
|
+
*/
|
|
12
|
+
constructor(browser, label) {
|
|
13
|
+
super(browser);
|
|
14
|
+
this.label = label;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_createXpath() {
|
|
18
|
+
return `//*[normalize-space(text())='${this.label}']/ancestor-or-self::label//input[@type='radio']`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 选择
|
|
23
|
+
*/
|
|
24
|
+
async select() {
|
|
25
|
+
if (!(await (await this.browser.findElement(this.getXpath())).isSelected())) {
|
|
26
|
+
await (await this.browser.findElement(this.getXpath())).click();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 取消选择
|
|
32
|
+
*/
|
|
33
|
+
async unselect() {
|
|
34
|
+
if (await (await this.browser.findElement(this.getXpath())).isSelected()) {
|
|
35
|
+
await (await this.browser.findElement(this.getXpath())).click();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = RadioComponent;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 选择器组件类
|
|
3
|
+
* @作者 MaoJJ
|
|
4
|
+
*/
|
|
5
|
+
class SelectComponent extends require("./Component") {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 选择器组件
|
|
9
|
+
* @param {Browser} browser 浏览器
|
|
10
|
+
* @param {String} placeholder 背景文字
|
|
11
|
+
* @param {String} label 标签
|
|
12
|
+
*/
|
|
13
|
+
constructor(browser, placeholder, label) {
|
|
14
|
+
super(browser);
|
|
15
|
+
this.placeholder = placeholder;
|
|
16
|
+
this.label = label;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_createXpath() {
|
|
20
|
+
if (this.placeholder) {
|
|
21
|
+
return `//input[@placeholder='${this.placeholder}']`;
|
|
22
|
+
}
|
|
23
|
+
if (this.label) {
|
|
24
|
+
return `//*[normalize-space(text())='${this.label}']/..//input`;
|
|
25
|
+
}
|
|
26
|
+
return "//input[@type='text']";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 选择选项
|
|
31
|
+
* @param {...String} items 选项
|
|
32
|
+
*/
|
|
33
|
+
async select(...items) {
|
|
34
|
+
let count = 2;
|
|
35
|
+
while (count > 0) {
|
|
36
|
+
try {
|
|
37
|
+
await this._select(...items);
|
|
38
|
+
const value = await this.getValue();
|
|
39
|
+
if (!(value && items.join().indexOf(value) !== -1)) {
|
|
40
|
+
throw new Error(`选择${items}失败`);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
} catch (error) {
|
|
44
|
+
if (count > 1) {
|
|
45
|
+
count--;
|
|
46
|
+
await this.browser.sleep(500);
|
|
47
|
+
} else {
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async _select(...items) {
|
|
57
|
+
class ListComponent extends require("./ListComponent") {
|
|
58
|
+
_createXpath() {
|
|
59
|
+
return "//*[contains(@class,'el-scrollbar')]//ul"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
let xpath = this.getXpath();
|
|
63
|
+
await (await this.browser.findElement(xpath)).click();
|
|
64
|
+
let listComponent = new ListComponent(this.browser);
|
|
65
|
+
await listComponent.select(...items);
|
|
66
|
+
if (items.length > 1) {
|
|
67
|
+
xpath = this.getXpath();
|
|
68
|
+
await (await this.browser.findElement(xpath)).click();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = SelectComponent;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 开关组件类
|
|
3
|
+
* @作者 MaoJJ
|
|
4
|
+
*/
|
|
5
|
+
class SwitchComponent extends require("./Component") {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 开关组件
|
|
9
|
+
* @param {Browser} browser 浏览器
|
|
10
|
+
* @param {String} label 标签
|
|
11
|
+
*/
|
|
12
|
+
constructor(browser, label) {
|
|
13
|
+
super(browser);
|
|
14
|
+
this.label = label;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_createXpath() {
|
|
18
|
+
if (this.label){
|
|
19
|
+
return `//*[normalize-space(text())='${this.label}']/..//*[@role='switch']`;
|
|
20
|
+
}
|
|
21
|
+
return "//*[@role='switch']";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 打开
|
|
26
|
+
*/
|
|
27
|
+
async on() {
|
|
28
|
+
let xpath = `${this.getXpath()}//input[@type='checkbox']`;
|
|
29
|
+
let checked = Boolean(await (await this.browser.findElement(xpath)).getAttribute("checked"));
|
|
30
|
+
if (!checked) {
|
|
31
|
+
await (await this.browser.findElement(xpath)).click();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 关闭
|
|
37
|
+
*/
|
|
38
|
+
async off() {
|
|
39
|
+
let xpath = `${this.getXpath()}//input[@type='checkbox']`;
|
|
40
|
+
let checked = Boolean(await (await this.browser.findElement(xpath)).getAttribute("checked"));
|
|
41
|
+
if (checked) {
|
|
42
|
+
await (await this.browser.findElement(xpath)).click();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = SwitchComponent;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表格组件类
|
|
3
|
+
* @作者 MaoJJ
|
|
4
|
+
*/
|
|
5
|
+
class TableComponent extends require("./Component") {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 表格组件
|
|
9
|
+
* @param {Browser} browser 浏览器
|
|
10
|
+
*/
|
|
11
|
+
constructor(browser) {
|
|
12
|
+
super(browser);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
_createRootXpath() {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_createXpath() {
|
|
20
|
+
return "//table";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_createHeaderXapth() {
|
|
24
|
+
return "//thead";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_createBodyXapth() {
|
|
28
|
+
return "//tbody";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 获取表格数据
|
|
33
|
+
* @returns 表格数据
|
|
34
|
+
*/
|
|
35
|
+
async getTableData() {
|
|
36
|
+
let ret = [];
|
|
37
|
+
let xpath = `(${this.getXpath()}${this._createBodyXapth()}//tr)[1]`;
|
|
38
|
+
if (!(await this.browser.isDisplayed(xpath, this.browser.config.timeout))) {
|
|
39
|
+
return ret;
|
|
40
|
+
}
|
|
41
|
+
await this.browser.sleep(TableComponent.delayTime);
|
|
42
|
+
// 处理表头
|
|
43
|
+
if (!this._createHeaderXapth()) {
|
|
44
|
+
return ret;
|
|
45
|
+
}
|
|
46
|
+
xpath = `(${this.getXpath()}${this._createHeaderXapth()}//tr)[1]/th`;
|
|
47
|
+
let titles = await this.browser.findElements(xpath);
|
|
48
|
+
for (let i = 0; i < titles.length; i++) {
|
|
49
|
+
titles[i] = (await titles[i].getText(true)).trim() || `#${String(i).padStart(3, "0")}`;
|
|
50
|
+
}
|
|
51
|
+
// 处理表体
|
|
52
|
+
xpath = `(${this.getXpath()}${this._createBodyXapth()})[1]//tr`;
|
|
53
|
+
let trs = await this.browser.findElements(xpath);
|
|
54
|
+
for (let i = 0; i < trs.length; i++) {
|
|
55
|
+
xpath = `(${this.getXpath()}${this._createBodyXapth()}//tr)[${i + 1}]/td`;
|
|
56
|
+
let tds = await this.browser.findElements(xpath);
|
|
57
|
+
let row = {};
|
|
58
|
+
for (let j = 0; j < tds.length; j++) {
|
|
59
|
+
let title = titles[j]
|
|
60
|
+
let text = (await tds[j].getText(true)).replaceAll("\n", " ");
|
|
61
|
+
row[title] = text;
|
|
62
|
+
}
|
|
63
|
+
ret.push(row);
|
|
64
|
+
}
|
|
65
|
+
return ret;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 获取块组件
|
|
71
|
+
* @param {Number} rowNumber 行号
|
|
72
|
+
* @param {Number} columnNumber 列号
|
|
73
|
+
* @returns 块组件
|
|
74
|
+
*/
|
|
75
|
+
blockComponent(rowNumber, columnNumber) {
|
|
76
|
+
let that = this;
|
|
77
|
+
class _BlockComponent extends require("./BlockComponent") {
|
|
78
|
+
_createRootXpath() {
|
|
79
|
+
return "";
|
|
80
|
+
}
|
|
81
|
+
_createXpath() {
|
|
82
|
+
if (columnNumber) {
|
|
83
|
+
return `(${that.getXpath()}${that._createBodyXapth()}//tr)[${rowNumber}]/td[${columnNumber}]`;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return `(${that.getXpath()}${that._createBodyXapth()}//tr)[${rowNumber}]`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return new _BlockComponent(this.browser, null);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
module.exports = TableComponent;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 文本组件类
|
|
3
|
+
* @作者 MaoJJ
|
|
4
|
+
*/
|
|
5
|
+
class TextComponent extends require("./Component") {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 文本组件
|
|
9
|
+
* @param {Browser} browser 浏览器
|
|
10
|
+
* @param {String} text 文本
|
|
11
|
+
*/
|
|
12
|
+
constructor(browser, text) {
|
|
13
|
+
super(browser);
|
|
14
|
+
this.text = text;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_createXpath() {
|
|
18
|
+
return `//*[normalize-space(text())='${this.text}']`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = TextComponent;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
const BlockComponent = require("../component/BlockComponent");
|
|
2
|
+
const ButtonComponent = require("../component/ButtonComponent");
|
|
3
|
+
const CascaderComponent = require("../component/CascaderComponent");
|
|
4
|
+
const CheckboxComponent = require("../component/CheckboxComponent");
|
|
5
|
+
const DialogComponent = require("../component/DialogComponent");
|
|
6
|
+
const InputComponent = require("../component/InputComponent");
|
|
7
|
+
const LeftMenuComponent = require("../component/LeftMenuComponent");
|
|
8
|
+
const ListComponent = require("../component/ListComponent");
|
|
9
|
+
const MessageComponent = require("../component/MessageComponent");
|
|
10
|
+
const RadioComponent = require("../component/RadioComponent");
|
|
11
|
+
const SelectComponent = require("../component/SelectComponent");
|
|
12
|
+
const SwitchComponent = require("../component/SwitchComponent");
|
|
13
|
+
const TableComponent = require("../component/TableComponent");
|
|
14
|
+
const TextComponent = require("../component/TextComponent");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 页面类
|
|
18
|
+
*/
|
|
19
|
+
class Page extends require("@winning-test/autotest-webui").Page {
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 页面类
|
|
23
|
+
* @param {Browser} browser 浏览器
|
|
24
|
+
*/
|
|
25
|
+
constructor(browser) {
|
|
26
|
+
super(browser);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 获取块组件
|
|
31
|
+
* @param {String} xpath xpath
|
|
32
|
+
* @returns 块组件
|
|
33
|
+
*/
|
|
34
|
+
blockComponent(xpath) {
|
|
35
|
+
return new BlockComponent(this.browser, xpath);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 获取按钮组件
|
|
40
|
+
* @param {String} text 文本
|
|
41
|
+
* @returns 按钮组件
|
|
42
|
+
*/
|
|
43
|
+
buttonComponent(text) {
|
|
44
|
+
return new ButtonComponent(this.browser, text);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 获取级联选择器组件
|
|
49
|
+
* @param {String} placeholder 背景文字
|
|
50
|
+
* @param {String} label 标签
|
|
51
|
+
* @returns 级联选择器组件
|
|
52
|
+
*/
|
|
53
|
+
cascaderComponent(placeholder, label) {
|
|
54
|
+
return new CascaderComponent(this.browser, placeholder, label);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 获取复选框组件
|
|
59
|
+
* @param {String} label 标签
|
|
60
|
+
* @returns 复选框组件
|
|
61
|
+
*/
|
|
62
|
+
checkboxComponent(label) {
|
|
63
|
+
return new CheckboxComponent(this.browser, label);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 获取对话框组件
|
|
68
|
+
* @param {String} title 标题
|
|
69
|
+
* @returns 对话框组件
|
|
70
|
+
*/
|
|
71
|
+
dialogComponent(title) {
|
|
72
|
+
return new DialogComponent(this.browser, title);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 获取输入框组件
|
|
77
|
+
* @param {String} placeholder 背景文字
|
|
78
|
+
* @param {String} label 标签
|
|
79
|
+
* @returns 输入框组件
|
|
80
|
+
*/
|
|
81
|
+
inputComponent(placeholder, label) {
|
|
82
|
+
return new InputComponent(this.browser, placeholder, label);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 获取左侧菜单组件
|
|
87
|
+
* @returns 左侧菜单组件
|
|
88
|
+
*/
|
|
89
|
+
leftMenuComponent() {
|
|
90
|
+
return new LeftMenuComponent(this.browser);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 获取列表组件
|
|
95
|
+
* @returns 列表组件
|
|
96
|
+
*/
|
|
97
|
+
listComponent() {
|
|
98
|
+
return new ListComponent(this.browser);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 获取消息组件
|
|
103
|
+
* @param {Stirng} text 文本
|
|
104
|
+
* @returns 消息组件
|
|
105
|
+
*/
|
|
106
|
+
messageComponent(text) {
|
|
107
|
+
return new MessageComponent(this.browser, text);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 获取选择器组件
|
|
112
|
+
* @param {String} placeholder 背景文字
|
|
113
|
+
* @param {String} label 标签
|
|
114
|
+
* @returns 选择器组件
|
|
115
|
+
*/
|
|
116
|
+
selectComponent(placeholder, label) {
|
|
117
|
+
return new SelectComponent(this.browser, placeholder, label);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 获取开关组件
|
|
122
|
+
* @param {String} label 标签
|
|
123
|
+
* @returns 开关组件
|
|
124
|
+
*/
|
|
125
|
+
switchComponent(label) {
|
|
126
|
+
return new SwitchComponent(this.browser, label);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 获取表格组件
|
|
131
|
+
* @returns 表格组件
|
|
132
|
+
*/
|
|
133
|
+
tableComponent() {
|
|
134
|
+
return new TableComponent(this.browser);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 获取文本组件
|
|
139
|
+
* @param {String} text 文本
|
|
140
|
+
* @returns 文本组件
|
|
141
|
+
*/
|
|
142
|
+
textComponent(text) {
|
|
143
|
+
return new TextComponent(this.browser, text);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 获取单选框组件
|
|
148
|
+
* @param {String} label 标签
|
|
149
|
+
* @returns 单选框组件
|
|
150
|
+
*/
|
|
151
|
+
radioComponent(label) {
|
|
152
|
+
return new RadioComponent(this.browser, label)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 等待加载
|
|
157
|
+
*/
|
|
158
|
+
async loading() {
|
|
159
|
+
try {
|
|
160
|
+
const xpath = "//*[contains(text(),'加载中')][not (ancestor-or-self::*[contains(@style,'display: none')])]";
|
|
161
|
+
if (await this.browser.isDisplayed(xpath, 1000)) {
|
|
162
|
+
await this.browser.waitUntilElementBeNotVisible(xpath);
|
|
163
|
+
}
|
|
164
|
+
} catch (error) {
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 关闭所有对话框
|
|
171
|
+
*/
|
|
172
|
+
async closeAllDialog() {
|
|
173
|
+
let count = 5;
|
|
174
|
+
while ((await this.dialogComponent().isDisplayed(500)) && count > 0) {
|
|
175
|
+
try {
|
|
176
|
+
await this.dialogComponent().blockComponent("//*[contains(@class,'el-dialog__close')]").click();
|
|
177
|
+
await this.dialogComponent().waitUntilBeNotVisible();
|
|
178
|
+
} catch (error) {
|
|
179
|
+
|
|
180
|
+
}
|
|
181
|
+
count--;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
module.exports = Page;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { Browser, Key } = require("@winning-test/autotest-webui");
|
|
2
|
+
const config = require("./component.test.json");
|
|
3
|
+
const Page = require("../page/Page")
|
|
4
|
+
const browser = new Browser();
|
|
5
|
+
|
|
6
|
+
beforeAll(async () => {
|
|
7
|
+
await browser.maximize();
|
|
8
|
+
await browser.get(config.url.doctor);
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
test("001", async () => {
|
|
12
|
+
const page = new Page(browser);
|
|
13
|
+
await page.inputComponent("请输入工号").input(config.user.doctor.用户名);
|
|
14
|
+
await page.inputComponent("请输入密码").input(config.user.doctor.密码);
|
|
15
|
+
await page.buttonComponent("登 录").click();
|
|
16
|
+
})
|
|
17
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
|
|
3
|
+
"url": {
|
|
4
|
+
"admin": "http://172.23.2.101:8090/#/login/admin",
|
|
5
|
+
"doctor": "http://172.23.2.101:8090/#/login/anes",
|
|
6
|
+
"nurse": "http://172.23.2.101:8090/#/login/nurse"
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
"user": {
|
|
10
|
+
"admin": {
|
|
11
|
+
"用户名": "admin",
|
|
12
|
+
"密码": "1234"
|
|
13
|
+
},
|
|
14
|
+
"doctor": {
|
|
15
|
+
"用户名": "23",
|
|
16
|
+
"密码": "1234"
|
|
17
|
+
},
|
|
18
|
+
"nurse": {
|
|
19
|
+
"用户名": "184",
|
|
20
|
+
"密码": "1234"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|