@winning-test/component 0.0.46 → 0.0.48

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.
@@ -173,7 +173,7 @@ class Page extends require("@winning-test/autotest-webui").Page {
173
173
  * 关闭打印窗口
174
174
  * @param {Number} timeout 等待时间, 单位: ms
175
175
  */
176
- async closePrintWindow(timeout = 10000) {
176
+ async closePrintWindow(timeout = 20000) {
177
177
  let count = timeout / 500;
178
178
  while (count > 0) {
179
179
  let windows = await this.browser.webDriver.getAllWindowHandles();
@@ -182,7 +182,7 @@ class Page extends require("@winning-test/autotest-webui").Page {
182
182
  count--;
183
183
  continue;
184
184
  }
185
- for (let i = windows.length; i > 0; i--) {
185
+ for (let i = windows.length - 1; i > 0; i--) {
186
186
  try {
187
187
  await this.browser.switchToWindow(i);
188
188
  await this.browser.webDriver.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winning-test/component",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "scripts": {