mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
page.waitFor should send ...args to page.waitForFunction (#775)
This lets the user pass `...args` into `page.waitFor`. It also clarifies that the docs that `options` is not optional if `...args` are specified. Fixes #770
This commit is contained in:
committed by
Andrey Lushnikov
parent
d562db3140
commit
e2cad568d6
@@ -530,6 +530,9 @@ describe('Page', function() {
|
||||
await page.waitFor({foo: 'bar'}).catch(e => error = e);
|
||||
expect(error.message).toContain('Unsupported target type');
|
||||
}));
|
||||
it('should wait for predicate with arguments', SX(async function() {
|
||||
await page.waitFor((arg1, arg2) => arg1 !== arg2, {}, 1, 2);
|
||||
}));
|
||||
});
|
||||
|
||||
describe('Page.Events.Console', function() {
|
||||
|
||||
Reference in New Issue
Block a user