Open In App

Sensors Tool in Microsoft Edge Browser

To debug or test your sites with respect to various sensors on the device, you can use the Sensors tool provided in the Edge browser. The sensors tool is used to override various sensors of the device, such as geolocation, orientation, touch, and idle state. You can design a website to change the UI or behaviour with respect to the sensing data returned by a sensor on a device.

Importance of Sensors:

Modern sites are allowed to access or take advantage of various sensors on the device with the help of the browser. The importance of sensors in web technology is:



Types of Sensors:

There are many sensors used in the device, but out of them, only some are usable or are allowed by the browsers for any usage. Some of the commonly used sensors in web technology are:

How to Open Sensors Tool in Microsoft Edge:

The Sensors tool is present in the DevTools in the Edge browser. To open the Sensors tool, follow these steps:



Step 1: First, open developer tools. To do that, right-click on the page and click Inspect, or you can just press the shortcut keys “Ctrl+Shift+I” or “F12“. A section will appear containing various developer tools.

Step 2: Now press the shortcut key “Ctrl+Shift+P” to access the Run Command menu. Type “sensors” and from the options that appear, click “show sensors“. Alternatively, you can also open the Sensors tool by just clicking three dots in the top right corner and navigating to More Tools > Sensors from the menu that appears.

Opening Sensors Tool using Run Command

Changing the Geolocation using Sensors Tool:

We can use the Sensors tool to override the geolocation so that the site can be tested for different locations. The UI of many sites changes with the location from which it is accessed, and we purposefully change our geolocation to check if the UI is working as intended.

Note: The geolocation will only be overridden if the site is allowed location access by the user.

The various options we get in the Location Section are:

Drop-down List for Locations

Various Location Options

Changing Device Orientation using Sensors Tool:

We can change the device orientation using the Sensors Tool. To check if the site UI is responsive enough to fit the device width once it is rotated, we use this option.

The various options provide in Orientation Section are:

Drop-down list for Orientation

Custom Orientation

Changing Device Interaction to Touch using Sensors Tool:

We can override the default interaction mode of click-to-touch using the Sensors tool. This helps us check the site interaction using touch.

The touch section provides only two options:

Touch Options

Changing User and Screen State using Sensors Tool:

We can change the user state to active or idle and the screen state to locked or unlocked using the Sensors tool. This helps to check if the site makes changes depending on the state of the screen or the user.

The Emulate Idle Detector State provides a drop-down list of various options:

Emulate Idle detector State

Conclusion:

Modern sites are designed to work differently on the basis of the location from which they are accessed, and some sites also take advantage of the orientation and state of the user and screen. To test these sites, users need to use various devices or VPNs to test the sites in other locations. All of the tedious testing can easily be done using the Sensors tool in Edge. It also provides a good UI and various options for developers to test their sites.


Article Tags :