0

I am trying to trick the Python chromedriver to make it believe that it is running in a different city.

It appears someone has found an answer for this in JavaScript, but I was wondering if it is possible to adapt it for Python using Selenium:

chromeDriver.executeScript("window.navigator.geolocation.getCurrentPosition = 
    function(success){
         var position = {"coords" : {
                                       "latitude": "30.9843", 
                                       "longitude": "91.9623"
                                     }
                         }; 
         success(position);}");

I tried all the suggested answers here, but none of them worked in Python.

Any help is much appreciated!

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.