Riadayal / Pytest-geolocation

A sample repo to help you add geolocation to an automation test in Pytest on LambdaTest. Run your automation test from a particular location to test location-based functionality

Home Page:https://www.lambdatest.com/intl/en-in/geolocation-testing?utm_source=github&utm_medium=about&utm_campaign=pytest_geolocation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

If you want to run your automation test for a particular location in Pytest 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:

capabilities = {
       "build": "Sample PY Build",
       "platformName": "Windows 11",
       "browserName": "Chrome",
       "browserVersion": "latest",
   	"geoLocation": "US"
}

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

Run your test

cd tests //navigate to tests directory
python sample_todo.py

Links:

LambdaTest Community