When performing automated tests, how can we acquire the browser’s userAgent?
Hi Ian,
You can get the userAgent by running this command: navigator.userAgent along with Javascript Executor
Here is a sample you can refer to:
print(driver.execute_script("return navigator.userAgent"))