mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: improve error message (#2222)
This commit is contained in:
parent
d611ca9278
commit
e081ba7256
@ -172,7 +172,7 @@ export abstract class BrowserContextBase extends ExtendedEventEmitter implements
|
|||||||
await pages[0].waitForLoadState();
|
await pages[0].waitForLoadState();
|
||||||
if (pages.length !== 1 || pages[0].url() !== 'about:blank') {
|
if (pages.length !== 1 || pages[0].url() !== 'about:blank') {
|
||||||
await this.close().catch(e => null);
|
await this.close().catch(e => null);
|
||||||
throw new Error('Arguments can not specify page to be opened');
|
throw new Error(`Arguments can not specify page to be opened (first url is ${pages[0].url()})`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user