title: How to change the displayed operating system information within the useragent using Selenium and Python?
body: <p>I'm building a bot that will change it's appearance based on the random user agent I select. I pull from a list of user agents, depending on the one selected, I change the capability of the webdriver and then launch it.</p>
  <p>However I'm using <a href="https://ipleak.net/" rel="nofollow noreferrer">https://ipleak.net/</a> to test, and no matter how many times I run this code my true operating system is still showing (instead of the supposedly spoofed version). Relevant code below, FYI true OS = MacIntel</p>
  <pre><code>desired_caps = DesiredCapabilities.CHROME.copy()
  desired_caps['platform'] = user_agent_os
  
  browser = webdriver.Chrome(options=options, desired_capabilities=desired_caps)
  browser.get(&quot;https://ipleak.net/&quot;)
  </code></pre>
  <p>Possible values for <code>user_agent_os</code> = 'ios', 'windows', 'andriod', '---', 'symbian', 'macos', 'linux' and some others. The value is randomised each time the programme runs.</p>