mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Remove userAgent getter (#126)
If needed, the user agent could be fetched via querying `navigator.userAgent` in page. Closes #110
This commit is contained in:
committed by
Andrey Lushnikov
parent
615381c70e
commit
877f06aacb
@@ -988,7 +988,7 @@ describe('Puppeteer', function() {
|
||||
|
||||
describe('Page.setUserAgent', function() {
|
||||
it('should work', SX(async function() {
|
||||
expect(page.userAgent()).toContain('Mozilla');
|
||||
expect(await page.evaluate(() => navigator.userAgent)).toContain('Mozilla');
|
||||
page.setUserAgent('foobar');
|
||||
page.navigate(EMPTY_PAGE);
|
||||
let request = await server.waitForRequest('/empty.html');
|
||||
|
||||
Reference in New Issue
Block a user