@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, id, xpath) {
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
- if (this.id) {
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
  /**
@@ -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(id, xpath) {
35
- return new BlockComponent(this.browser, id, xpath);
33
+ blockComponent(xpath) {
34
+ return new BlockComponent(this.browser, xpath);
36
35
  }
37
36
 
38
37
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winning-test/component",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "scripts": {