@winning-test/component 0.0.54 → 0.0.56

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.
@@ -188,7 +188,7 @@ class Page extends require("@winning-test/autotest-webui").Page {
188
188
  await this.browser.webDriver.close();
189
189
  break;
190
190
  } catch (error) {
191
- throw new Error(`关闭打印窗口失败: ${error.message}`);
191
+ console.log(error);
192
192
  }
193
193
  }
194
194
  break;
@@ -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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winning-test/component",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "scripts": {