You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# How to add geolocation to an automation test in Python-selenium on [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=Python-selenium-geolocation)
2
+
3
+
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](https://github.com/LambdaTest/python-selenium-sample).
4
+
5
+
# Steps:
6
+
7
+
To run your automation test from a particular location to test location based functionality, you can change the geolocation using the 'geolocation' capability:
8
+
9
+
```python
10
+
desired_caps = {
11
+
'LT:Options': {
12
+
"build": "Python Demo", # Change your build name here
13
+
"name": "Python Demo Test", # Change your test name here
14
+
"platformName": "Windows 11",
15
+
"selenium_version": "4.0.0",
16
+
"geoLocation": "US"
17
+
},
18
+
"browserName": "Chrome",
19
+
"browserVersion": "98.0",
20
+
}
21
+
22
+
```
23
+
24
+
For the full list of available geolocations, you can refer [here](https://www.lambdatest.com/support/docs/selenium-automation-capabilities/#selenium-automation-testing-from-different-geolocations).
0 commit comments