---
description: Mock Device Location in Your Test
---

# Set Location

This guide explains how to use the **Set Location** step to mock the GPS coordinates of a device during your test execution. This is crucial for testing location-dependent features like local search, map services, or region-specific content.

**Step 1: Click on Select a Step and Select "Set Location"**

From the actions menu, scroll down and select **Set Location**.

<figure><img src="https://3741940050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlJodSwxTIBbHmZhKEX5%2Fuploads%2FEATyneosv9PfiT1LEcMT%2FScreenshot%202025-08-05%20at%2011.05.01%E2%80%AFPM.png?alt=media&#x26;token=b19ceedd-2641-45c3-82cc-e8fc92634a4a" alt="" width="375"><figcaption></figcaption></figure>

**Step 2: Configure Location**

After selecting "Set Location," you will be directed to its configuration screen where you can define the specific coordinates with latitude and longitude.

<figure><img src="https://3741940050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlJodSwxTIBbHmZhKEX5%2Fuploads%2FWkYlF13AVPQwIHibx1WA%2FScreenshot%202025-08-05%20at%2011.05.13%E2%80%AFPM.png?alt=media&#x26;token=859db61d-926c-44c1-8a12-ed2a95b9a0aa" alt="" width="375"><figcaption></figcaption></figure>

### Set Location with Variables

You can also reuse variables to set latitude and longitude

**Step 1: Click the "+" icon on the Latitude field**

<figure><img src="https://3741940050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlJodSwxTIBbHmZhKEX5%2Fuploads%2F3YB4pi7zguPkO4Dgmgv9%2FScreenshot%202025-08-05%20at%2011.15.06%E2%80%AFPM.png?alt=media&#x26;token=9c425c86-8ba2-40d5-9660-957876519767" alt="" width="375"><figcaption></figcaption></figure>

**Step 2: Select the variable to use for Latitude**

<figure><img src="https://3741940050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlJodSwxTIBbHmZhKEX5%2Fuploads%2FyfxkaZVDDCSJSWuxBqT0%2FScreenshot%202025-08-05%20at%2011.15.23%E2%80%AFPM.png?alt=media&#x26;token=f5bb247b-3a14-40e2-b7b6-a2aac38a9e49" alt=""><figcaption></figcaption></figure>

Once the variables are selected, you'll see that the latitude and longitude fields are replaced by respective variabled you have selected.

<figure><img src="https://3741940050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlJodSwxTIBbHmZhKEX5%2Fuploads%2FyKIQ9CQkLPUmpBaulprL%2FScreenshot%202025-08-05%20at%2011.19.44%E2%80%AFPM.png?alt=media&#x26;token=8490175f-a201-4ff7-8e4b-340c41296373" alt="" width="375"><figcaption></figcaption></figure>
