@winning-test/component 0.0.55 → 0.0.57
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.
|
@@ -7,22 +7,15 @@ class BlockComponent extends require("./Component") {
|
|
|
7
7
|
/**
|
|
8
8
|
* 块组件
|
|
9
9
|
* @param {Browser} browser
|
|
10
|
-
* @param {String} id id
|
|
11
10
|
* @param {String} xpath xpath
|
|
12
11
|
*/
|
|
13
|
-
constructor(browser,
|
|
12
|
+
constructor(browser, xpath) {
|
|
14
13
|
super(browser);
|
|
15
|
-
this.id = id;
|
|
16
14
|
this.xpath = xpath;
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
_createXpath() {
|
|
20
|
-
|
|
21
|
-
return `//*[@id='${this.id}']`
|
|
22
|
-
}
|
|
23
|
-
if (this.xpath) {
|
|
24
|
-
return this.xpath;
|
|
25
|
-
}
|
|
18
|
+
return this.xpath;
|
|
26
19
|
}
|
|
27
20
|
|
|
28
21
|
/**
|
package/infusion60/page/Page.js
CHANGED
|
@@ -27,12 +27,11 @@ class Page extends require("@winning-test/autotest-webui").Page {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* 获取块组件
|
|
30
|
-
* @param {String} id id
|
|
31
30
|
* @param {String} xpath xpath
|
|
32
31
|
* @returns 块组件
|
|
33
32
|
*/
|
|
34
|
-
blockComponent(
|
|
35
|
-
return new BlockComponent(this.browser,
|
|
33
|
+
blockComponent(xpath) {
|
|
34
|
+
return new BlockComponent(this.browser, xpath);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
/**
|