Skip to content

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

Notifications You must be signed in to change notification settings

Elmasekar/UnitTest-geolocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

How to add geolocation to an automation test in UnitTest on LambdaTest

If you want to run your automation test for a particular location in UnitTest 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_test.py

Links:

LambdaTest Community