This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 149
PhantomJS userAgent setting? #561
Comments
hi. you can do it from the config: desiredCapabilities: {
browserName: 'chrome',
version: 48,
chromeOptions: {
mobileEmulation: {
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/9.2 Mobile/12A4345d Safari/600.1.4'
}
}
} |
more info here |
@sipayRT You are speaking about ChromeDriver, that's no problem to set its settings with config as you mentioned. But my question is about PhantomJS |
sorry, but I don't know how to do it in phantomJS. you can ask phantomJS maintainers ;) |
Surely, I know how to do this on plain phantomjs: var webPage = require('webpage');
var page = webPage.create();
page.settings.userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36'; (source: http://phantomjs.org/api/webpage/property/settings.html) But don't know how to perform the same thing within gemini using phantomjs Is there any chance to do this? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I need to test my pages with PhantomJS with custom userAgent set.
That is, is there any hook available for thing like that:
Could that be made anyhow? E.g. with
desiredCapabilities
in config, with suite actions, or in any else way?Didn't find any key on this in documentation.
The text was updated successfully, but these errors were encountered: