Software Development and QA Tips By QASource Experts

How to Inspect Element in an Android Browser?

Written by QASource Engineering Team | Aug 26, 2024 4:00:00 PM

Inspecting elements on an Android browser from your desktop ensures your websites are optimized for mobile users. Below are the step-by-step instructions/process using Google Chrome and Mozilla Firefox:

Google Chrome on Android and Chrome DevTools

  1. From Android Device, Enable Developer Options by following the below steps:
    • Navigate to Settings > About Phone.
    • Keep tapping the Build number until the message "You are now a developer!" is displayed.
    • Go back to Developer options under Settings.
  2. Activate USB Debugging
    • In Developer options, toggle USB debugging.
  3. Connect the Android Device to the Computer
    • Use a USB cable to connect your Android device to your desktop.
  4. Open Google Chrome on Your Computer
    • Make sure that Google Chrome is installed on your desktop machine.
    • Launch Chrome and enter chrome://inspect in the address bar.
  5. Enable Remote Debugging in Chrome DevTools
    • Your connected Android device should appear under "Remote devices".
    • Click on Inspect next to your device name.
  6. Inspect Elements on the Mobile Browser
    • Chrome DevTools will open and display the mobile browser content.
    • You can inspect and edit the DOM using the Elements panel, similar to how you would debug a desktop site.
 

Mozilla Firefox on Android and Firefox Developer Tools

  1. From the Android Device, Enable Developer Options and USB Debugging by following the below steps:
    • Follow the steps above to enable developer options and USB debugging.
  2. Connect the Android Device to the Computer
    • Use a USB cable to connect your Android device to your desktop.
  3. Open Mozilla Firefox on Your Computer
    • Make sure Mozilla Firefox is installed on your desktop.
    • Type about: debugging in the address bar.
  4. Enable Remote Debugging in Firefox
    • Open Firefox on your Android device.
    • On your desktop, go to about:debugging.
    • Your device should appear under "USB devices". Click on Inspect next to the tab you want to debug.
  5. Inspect Elements on the Mobile Browser
    • Firefox Developer Tools will open, allowing you to inspect and modify the mobile webpage.

Following these steps, you can effectively inspect and debug elements on an Android browser from your desktop computer, ensuring your websites are fully functional and user-friendly on mobile devices.