mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Add Page.browser() method (#2387)
Call page.browser() to get the browser instance associated with a page. Fixes #2275
This commit is contained in:
committed by
Andrey Lushnikov
parent
6eb6ce0ec9
commit
082b11aa57
@@ -1562,4 +1562,10 @@ module.exports.addTests = function({testRunner, expect, puppeteer, DeviceDescrip
|
||||
await closedPromise;
|
||||
});
|
||||
});
|
||||
|
||||
describe('Page.browser', function() {
|
||||
it('should return the correct browser instance', async function({ page, browser }) {
|
||||
expect(page.browser()).toBe(browser);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user