@winning-test/component 0.0.70 → 0.0.71

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.
@@ -44,7 +44,7 @@ class TableComponent extends require("./Component") {
44
44
  xpath = `(${this.getXpath()}${this._createHeaderXapth()}//tr)[1]/th`;
45
45
  let titles = await this.browser.findElements(xpath);
46
46
  for (let i = 0; i < titles.length; i++) {
47
- titles[i] = (await titles[i].getText(true)).trim();
47
+ titles[i] = ((await titles[i].getText(true)).replaceAll("\n", "")).trim();
48
48
  }
49
49
  // 处理表体
50
50
  xpath = `${this.getXpath()}${this._createBodyXapth()}//tr[contains(@class, 'w-table__row')]`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winning-test/component",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "scripts": {
@@ -14,8 +14,8 @@
14
14
  "license": "ISC",
15
15
  "devDependencies": {
16
16
  "@types/jest": "^29.5.3",
17
- "@winning-test/autotest-webui": "^0.1.48",
18
- "chromedriver": "^114.0.3",
19
- "jest": "^29.6.1"
17
+ "@winning-test/autotest-webui": "^0.1.50",
18
+ "chromedriver": "^115.0.1",
19
+ "jest": "^29.6.2"
20
20
  }
21
21
  }
@@ -186,11 +186,11 @@ class Page extends require("@winning-test/autotest-webui").Page {
186
186
  }
187
187
  /**
188
188
  * 切换到对应的iframe
189
- * @param {string} xpath
189
+ * @param {string} srcTag
190
190
  */
191
- async switchToPageFrame(xpath) {
191
+ async switchToFrame(srcTag) {
192
192
  try {
193
- await this.browser.switchToFrame(xpath);
193
+ await this.browser.switchToFrame(`//iframe[contains(@src,'${srcTag}')]`);
194
194
 
195
195
  } catch (error) {
196
196