How do I Change IP geolocation in Real Devices with Appium Cucumber on LambdaTest cloud?
Hey Rhian,
While performing an app with appium mobile testing on TestMu AI Grid, you may face a scenario where you would like to simulate the location of a specific country.
You can easily do that by using the lambdatest capability “GeoLocation” and refer the 2-letter country code in the automation script. You can refer to the sample test repo:
The following is an example on how to set geoLocation in the capabilities in your automation script.
Appending the code in first.config.yml:
server: "mobile-hub.lambdatest.com"
common_caps:
"user": "username"
"accessKey": "accesskey"
"project": "First Cucumber Android Project"
"build": "build-1"
browser_caps:
-
"platformName": "iOS"
"platformVersion": "12.0"
"deviceName": "iPhone 8"
"app": "lt://"
"name": "first_test"
"isRealMobile": "true"
#ADD GEOLOCATION BASED ON COUNTRY CODE
"geoLocation":"fr"
Here’s the GitHub repo for the same:
Follow the support documentation to get started.