How to Inspect Element on Android device

Inspect element on Android

Inspect element is a very useful feature for developers or newbie coders who just entered the web development field. Whenever a web developer or coder finds a UI bug, the first thing they tend to do is inspect that specific element. Inspecting an element helps a developer to view the source code in real time and edit the HTML and CSS code of a particular web page. Sometimes we need to view the result of our code live and want to do some corrections to our code. So in that case, inspect element tool becomes so useful. You can see the source code of any website on PC as well as on android. In this article, we will be discussing how to inspect elements on Android devices.

On PC to see the source code of a website you can do it in 2 ways, one is by right-clicking on your mouse and clicking on inspect element option and the 2nd way is that press Ctrl + U button on your keyboard. But how do inspect elements on an Android device? Below in this article, we listed 3 different ways by which you can see the source code of any website. These inspect elements for Android are useful when you don’t have PC with you.

Inspect element means you can see the source code of a web page. Generally, not all the common users use this feature or tool, we can say. Mostly developers use inspect tool to see the source code and beginner developers who sometime try to create a particular webpage. They see code to learn coding. Developers use this tool very frequently to troubleshoot problems with a website.

Inspect element feature is available on PC, but what about android users. All the time you can’t have laptop with you. But after Android version 7.0 which was Nougat, Google introduced a new feature of inspect element. That lets users inspect an element in their browser. Now, users can edit the HTML or CSS code of any web page on their Android device.

In this article, we will see a step-by-step guide on how to inspect elements on an Android device.

Ways to Inspect elements on Android devices

There are different ways to inspect elements on Android devices. Below we described all the methods in brief and in easy steps.

Using real android devices on BrowserStack

Using developer tools in Chrome and Firefox browser

Using Google Chrome on Android devices

Using some other third-party applications element option to see the source code.

Using Real Android Devices on BrowserStack

We have different web browsers for mobile devices and PCs such as Google Chrome, Microsoft Edge, Mozilla Firefox, Safari etc. Every browser has some unique and useful features, and they regularly get updates and we see new features in them. If you are a developer, then according to a developer’s perspective for web development, it is hard to develop applications in a highly fragmented environment.

In such cases, the development team need access to effective tools and infrastructure that enables them to test the web applications on multiple devices and browsers.

BrowserStack is one of the popular platforms that provides almost all the necessary tools and a perfect infrastructure for web developers to test web applications. BrowserStack’s real device cloud provides more than 3000 real devices and different browsers to test your web application. This makes cross-browser testing very easy and cost-effective, you don’t need multiple devices and browsers to test your applications.

The web development team can pick combinations of browsers, real devices and different operating systems.

E.g. If an application tester is wondering how to inspect elements on Chrome – Android, then they can simply sign up for free on the BrowserStack platform and choose the particular device combination on BrowserStack as shown in the image below.

selecting device 1 700x506 1

Using developer tools in Google Chrome and Firefox

Google Chrome and Firefox provide the best features for device simulation in their DevTools.

Below is the process on how to inspect elements on Android using Chrome and Firefox.

1 – Firstly press the function key F12 on your keyboard to start DevTools on the desktop browser

2 – Now click on the Toggle Device Bar option

3 – Now select any Android device from the options

4 – Once the user selects a particular Android device model, the mobile version of the desired website starts

5 – Developers can now start inspecting the website on the desired Android device from their desktops.

Using Google Chrome on Android

You can use the Google Chrome browser on your Android device to inspect elements. This browser allows you to remotely debug any element on your Android device from your desktop or laptop, doesn’t matter what you are using.

Now let’s see how to inspect elements on Android using Google Chrome.

1 – Firstly, enable the developer option on your Android device.

2 – Select the USB Debugging mode on your device. This will enable the debug mode when the USB will be connected.

3 – Now open your Chrome browser and enter the address chrome://inspect#devices

4 – Make sure that Discover USB devices is already enabled. This will list all the devices connected to your system via USB.

5 – Once the device is connected, you will see a label box next to the device name. Enter the URL and click on the Open button.

6 – Now click on the Inspect next to the url.

inspect chrome on android 700x313 1

The main problem with this option is that you will have to test every device individually. Which is a time-consuming process as well as it is also difficult to scale. To do that in scale, you need your own device lab to test the different devices using this feature.

Using some applications

There are hundreds of third-party applications that you can use to inspect elements of a web page for Android as well as iPhones and iPad. Download any of the inspect element apps from the Google Play Store and test it. These type of apps allows you to inspect any element as well as edit it.

The main problem with these apps is that the app opens with a smaller resolution because of the small screen of smartphones. Because of that, the elements and code look smaller and it becomes hard to edit the elements on a small screen.