title: How to change geolocation of chrome selenium driver in Python?
body: <p>I am trying to trick the chromedriver to make it believe that it is running in a different city. Under normal circumstances, this can easily be done manually as shown in a quick diagram</p>
  
  <p><img src="https://i.stack.imgur.com/G1JGv.png" alt="Here"></p>
  
  <p>Then, when a google search is done, the new coordinates are used, and the results that would normally originate from that location are displayed. You can confirm that this worked when you look at the bottom of a Google search page as seen </p>
  
  <p><img src="https://i.stack.imgur.com/NKIbd.png" alt="Here">.</p>
  
  <p>However, Selenium can only control what the browser displays, not the browser in itself. I cannot tell Selenium to automatically click the buttons needed to change the coordinates. I tried the solutions posted <a href="https://stackoverflow.com/questions/8411816/how-do-i-enable-geolocation-support-in-chromedriver-for-selenium">here</a> but that is not meant for Python, and even after I tried to adapt the script, nothing seemed to happen.</p>
  
  <p>Is there a browser.execute_script() argument that could work, or is this the wrong way to change the geolocation?</p>