title: Changing UserAgent With Selenium on PhantomJS
body: <p>I am trying to change the useragent of phantomjs using selenium on Python. No matter what I try, it is just not working. Following is the code that is supposed to work...</p>
  
  <pre><code>    dcap = dict(DesiredCapabilities.PHANTOMJS)
      dcap["phantomjs.page.settings.userAgent"] = ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36") 
      dvvr =webdriver.PhantomJS("phantomjs.exe", desired_capabilities=dcap)
  </code></pre>
  
  <p>However, when I run the code it is sending the default UserAgent of Python-urllib/3.5</p>