Modern responsive web applications frequently rely on device hardware APIs to deliver tailored user experiences. Location-based web apps query the HTML5 Geolocation API, 3D interactive graphics track gyroscope device orientation, and touch interfaces respond to mobile gesture events. However, testing these hardware-dependent features during desktop development traditionally requires deploying code to physical mobile test devices and physically moving around.
Microsoft Edge DevTools includes a powerful built-in hardware emulator known as the Sensors Tool. Located in the DevTools drawer, the Sensors panel allows developers to mock arbitrary GPS coordinates, test custom timezone overrides, emulate accelerometer tilt angles, and simulate touch events directly inside the desktop browser. This guide demonstrates how to configure and use the Sensors tool.
Opening the Sensors Drawer in Edge DevTools
- Open Microsoft Edge and press
F12to launch DevTools. - Press
Ctrl + Shift + P(Windows) orCmd + Shift + P(macOS) to open the Command Menu. - Type
Sensorsand select Show Sensors. - The Sensors tool docks immediately in the bottom drawer panel.
Core Emulation Capabilities
1. Overriding Geolocation Coordinates
Test how your web application behaves for users located in different cities or continents without using a VPN:
- Locate the Location dropdown menu in the Sensors pane.
- Choose a preset metropolitan city (e.g. London, Tokyo, San Francisco, or Mumbai).
- Alternatively, select Other… and enter custom numeric latitude, longitude, and timezone values (e.g.
Lat: 51.5074, Long: -0.1278). - Choose Location unavailable from the dropdown to test fallback error handling when a user denies browser location permissions.
2. Simulating Device Orientation (Gyroscope & Accelerometer)
For web applications responding to device tilt or 3D canvas motion (such as gaming, augmented reality, or card flip interactions):
- Navigate to the Orientation section.
- Select an orientation preset (e.g. Portrait upside down, Landscape left, Display down).
- Alternatively, click and drag the interactive 3D mobile phone model on screen. Moving the graphic rotates the virtual device in three-dimensional space, feeding live
alpha,beta, andgammarotation values into the browser’sDeviceOrientationEventlistener.
3. Emulating Touch and Pressure States
In the Touch section:
- Select Force enabled to force the browser to treat all mouse clicks as mobile touch events (firing
touchstart,touchmove, andtouchend). - Emulate pressure sensitivity levels to test dynamic drawing canvases and pressure-sensitive web controls.
Sensors Tool Quick Reference Table
| Sensor Feature | Hardware API Emulated | Primary Testing Context |
|---|---|---|
| Location Override | navigator.geolocation |
Local store finders, regional pricing, weather widgets |
| Timezone ID | Intl.DateTimeFormat |
Localized date/time displays and calendar scheduling |
| Device Orientation | DeviceOrientationEvent |
Gyroscope games, 3D product view models, compasses |
| Touch Simulation | TouchEvent |
Mobile swipe gestures, carousel navigation, drawing apps |