How do I change IP geolocation in Real Devices with Appium Cucumber on LambdaTest cloud?

How do I Change IP geolocation in Real Devices with Appium Cucumber on LambdaTest cloud?

Hey Rhian,

While performing app with appium moibile testing on LambdaTest Grid, you may face a scenario where you would like to simulate 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 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: https://github.com/payalgulati909/appium-ruby-cucumber-geolocation