Inspect elements in Mobile Web application

     Web content behaves differently on mobile than on desktop. While automating mobile web application most of the time I have faced lots of problem in identifying the element locators to do the actions. Here we have the Chrome DevTools for inspect element of Mobile Web application in Android and Safari Web Inspector for inspect elements of Mobile Web application in iOS.

Inspect elements using Chrome DevTools

Requirements:

1. Chrome 32 or later installed on your development machine.

2. A USB cable to connect your Android device.

3. Android 4.0+ and Chrome for Android.

Steps:

1. Connect Android mobile device to PC (make sure that Android Debugging enabled in Android Developer Option in device).

2. Open chrome browser in Android mobile device.

3. Open below URL in Desktop chrome browser:

              chrome://inspect/#devices

You can see the connected device in Chrome Developer Tool page.

1

4. Enter the URL which you want to automate and inspect elements. URL must be entered in “Open tab with url” edit box, then tap on ‘open’ button and you can see that the specified URL gets open in Device browser.

5. Click on ‘inspect’ link and it will open another window to inspect the elements. Once it gets loaded you can start inspect elements and go ahead automation.

2

 

Inspect elements using Safari Web Inspector           

1. Open Safari on your iOS device.

2. Connect it to your computer via USB.

3. Open Safari on your computer.

4. In Safari’s menu, go to Develop and, look for your device’s name.

5. Select the tab you want to inspect.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s