I am trying to get the actual user agent that I am using in Selenium, at the moment with the chromedriver.
I found a Java version of this problem: How to get userAgent information in Selenium Web driver.
Does someone know how to do that in Python?
I am trying to get the actual user agent that I am using in Selenium, at the moment with the chromedriver.
I found a Java version of this problem: How to get userAgent information in Selenium Web driver.
Does someone know how to do that in Python?
The same manner as inside your link:
user_agent = driver.execute_script("return navigator.userAgent;")
PS: Using execute_script method you can run JS inside your driver.
Hope it helps you!