I know it is possible to open a desktop web browser with Selenium WeDriver. The following lines written in Java allows doing so:

WebDriver webDriverChrome = new ChromeDriver();

At the same time we can debug web application on mobile browsers using inspect screen while mobile devices are connected via USB:

enter image description here

enter image description here

The question is:

Is it possible to automate the inspection of web pages via mobile browsers using real devices with Selenium WebDriver?

  • could you add more infromation on how you are debuggin mobile browser , please add the configuration infromationn
    – PDHide
    Commented Feb 25, 2021 at 17:26
  • What configuration do you require? Browser versions and devices?
    – Seeker001
    Commented Feb 26, 2021 at 11:20
  • how are you debugging mobile browser in desktop
    – PDHide
    Commented Feb 26, 2021 at 11:26
  • Via the page which is displayed on the first screen. "inspect" button.
    – Seeker001
    Commented Feb 26, 2021 at 11:55
  • 1
    @PDHide --- It is possible to inspect chrome running on a mobile phone. Try plugging an android phone into a laptop and going to this URL --- chrome://inspect/#devices
    – ToastMan
    Commented Feb 26, 2021 at 15:11

3 Answers 3


Answer is yes , you dont need appium .


Thanks for the wonderful question

You can run chrome in android device straight from selenium:

First make sure adb version is latest:

download latest from : https://developer.android.com/studio/releases/platform-tools

the adb will be inside the platform tool

Now make sure device detected


adb devices

And make sure device shows in the list

enter image description here

make sure it is showing device and not unauthorized:

Now you can run below code:


you can add experimental option (for any binding )

options = webdriver.ChromeOptions()
options.add_experimental_option('androidPackage', 'com.android.chrome')
driver = webdriver.Chrome('./chromedriver', options=options)

You can see how to inspect from desktop here:

https://developers.google.com/web/tools/chrome-devtools/remote-debugging#troubleshooting https://developers.google.com/web/tools/chrome-devtools/remote-debugging


I think the answer you are looking for is "Appium". Appium is very similar to Selenium WebDriver, except you will need to update the desired capabilities in order to work with the mobile browser.


Yes. It is possible to automate the inspection of web pages via mobile browsers using real devices with Selenium WebDriver. Appium can help you the most.

Appium is an open source test automation framework for use with native, hybrid and mobile web apps. NO dependency on Mobile device OS. It has framework or wrapper that translate Selenium Webdriver commands into UIAutomation (iOS) or UIAutomator (Android) commands depending on the device type, not any OS type.

Appium supports all languages that have Selenium client libraries like- Java, Objective-C, JavaScript with node.js, PHP, Ruby, Python, C#, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.