Make page.url() return URL synchronously.

page.url() is just a shortcut to page.mainFrame().url().

References #39.
This commit is contained in:
Andrey Lushnikov
2017-07-14 14:05:27 -07:00
parent 34a96a8462
commit 560b817d7f
3 changed files with 8 additions and 6 deletions

View File

@@ -778,9 +778,9 @@ describe('Puppeteer', function() {
describe('Page.url', function() {
it('should work', SX(async function() {
expect(await page.url()).toBe('about:blank');
expect(page.url()).toBe('about:blank');
await page.navigate(EMPTY_PAGE);
expect(await page.url()).toBe(EMPTY_PAGE);
expect(page.url()).toBe(EMPTY_PAGE);
}));
});