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...
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)
However, when I run the code it is sending the default UserAgent of Python-urllib/3.5