Reputation: 26089
I am creating a Safari WebDriver instance with:
import selenium.webdriver
driver = webdriver.Safari()
Now I'd like to set a custom user agent for the browser. I have noticed that the Safari constructor accepts service_args that selenium service.py file sends further like this:
def command_line_args(self):
return ["-p", "%s" % self.port] + self.service_args
But there is lack of documentation on how to properly set a user agent for the Safari webdriver in Python. How to set the user agent?
Upvotes: 1
Views: 330