@winning-test/component 0.0.53 → 0.0.55
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.
- package/edis5.6/page/Page.js +1 -6
- package/package.json +1 -1
package/edis5.6/page/Page.js
CHANGED
|
@@ -175,7 +175,6 @@ class Page extends require("@winning-test/autotest-webui").Page {
|
|
|
175
175
|
*/
|
|
176
176
|
async closePrintWindow(timeout = 20000) {
|
|
177
177
|
let count = timeout / 500;
|
|
178
|
-
let closeFlag = false;
|
|
179
178
|
while (count > 0) {
|
|
180
179
|
let windows = await this.browser.webDriver.getAllWindowHandles();
|
|
181
180
|
if (windows.length === 1) {
|
|
@@ -187,17 +186,13 @@ class Page extends require("@winning-test/autotest-webui").Page {
|
|
|
187
186
|
try {
|
|
188
187
|
await this.browser.switchToWindow(i);
|
|
189
188
|
await this.browser.webDriver.close();
|
|
190
|
-
closeFlag = true;
|
|
191
189
|
break;
|
|
192
190
|
} catch (error) {
|
|
193
|
-
|
|
191
|
+
console.log(error);
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
194
|
break;
|
|
197
195
|
}
|
|
198
|
-
if (!closeFlag) {
|
|
199
|
-
throw new Error(`打印窗口未出现`);
|
|
200
|
-
}
|
|
201
196
|
await this.browser.switchToWindow();
|
|
202
197
|
}
|
|
203
198
|
|