mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(webkit): rewrite global object retrieval errors (#640)
This commit is contained in:
parent
fb9ec96e3e
commit
f1d1dfb081
@ -111,7 +111,15 @@ export class WKExecutionContext implements js.ExecutionContextDelegate {
|
||||
serializableArgs = args;
|
||||
}
|
||||
|
||||
const thisObjectId = await this._contextGlobalObjectId();
|
||||
let thisObjectId;
|
||||
try {
|
||||
thisObjectId = await this._contextGlobalObjectId();
|
||||
} catch (error) {
|
||||
if (error.message.includes('Missing injected script for given'))
|
||||
throw new Error('Execution context was destroyed, most likely because of a navigation.');
|
||||
throw error;
|
||||
}
|
||||
|
||||
let callFunctionOnPromise;
|
||||
try {
|
||||
callFunctionOnPromise = this._session.send('Runtime.callFunctionOn', {
|
||||
|
||||
@ -181,8 +181,8 @@ module.exports.describe = function({testRunner, expect, product, FFOX, CHROMIUM,
|
||||
const screenshot = await page.screenshot();
|
||||
expect(screenshot).toBeGolden('screenshot-webgl.png');
|
||||
});
|
||||
// firefox and webkit are flaky
|
||||
it.skip(FFOX || WEBKIT)('should work while navigating', async({page, server}) => {
|
||||
// firefox is flaky
|
||||
it.skip(FFOX)('should work while navigating', async({page, server}) => {
|
||||
await page.setViewport({width: 500, height: 500});
|
||||
await page.goto(server.PREFIX + '/redirectloop1.html');
|
||||
for (let i = 0; i < 10; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user