Elmasekar / Python-selenium-geolocation

A sample repo to help you add geolocation to an automation test in Python-selenium on LambdaTest. Run your automation test python scripts on Lambdatest.

Home Page:https://www.lambdatest.com/selenium-automation/?utm_source=github&utm_medium=about&utm_campaign=python-selenium-geolocation

Repository from Github https://github.comElmasekar/Python-selenium-geolocationRepository from Github https://github.comElmasekar/Python-selenium-geolocation

How to add geolocation to an automation test in Python-selenium on LambdaTest

If you want to run you automation test for a particular location in Python-selenium on Lambdatest, you can use the following steps. You can refer to sample test repo here.

Steps:

To run your automation test from a particular location to test location based functionality, you can change the geolocation using the 'geolocation' capability:

desired_caps = {
            'LT:Options': {
                "build": "Python Demo",  # Change your build name here
                "name": "Python Demo Test",  # Change your test name here
                "platformName": "Windows 11",
                "selenium_version": "4.0.0",
                "geoLocation": "US"  
            },
            "browserName": "Chrome",
            "browserVersion": "98.0",
        }

For the full list of available geolocations, you can refer here.

Run your test

python lambdatest.py

Links:

LambdaTest Community