Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Add user agent as an option #17

Open
robwha opened this issue Apr 4, 2014 · 1 comment
Open

Add user agent as an option #17

robwha opened this issue Apr 4, 2014 · 1 comment

Comments

@robwha
Copy link

robwha commented Apr 4, 2014

I'm trying to pass the user agent into Phantomjs to emulate mobile pages. Any ideas on how or could this be added?

@nikolassv
Copy link
Contributor

I have just merged a pull request that adds a new property to the options: pageOptions. This property will be used as options for phantomJS' page object. You should now be able to set the user agent with: options.pageOptions.settings.userAgent = "Your User Agent". See http://phantomjs.org/api/webpage/property/settings.html for more information.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants