Debugging webview via Native Android Application by Chrome inspect
Debug webview without Source code via Native Android App for QA , Tester who would like to see webview response so let check it out #myfirstmedium
My First Medium, Today I would like to recommend Chorme inspect for debugging webview via Application so why should we do for?
“Debuging webview via Android app for checking the flow is correctly or not for following the product requirement of PO. As I know sometime Developer code the same thing but effect different things that why we should have this article to see what is happend with webview response”
“How we can debug webview via Navtive android app?”
Everyone can follow my instructions below. I guarantee it will work for you ^^
Preparation:
- Emulator Build from Android Studio incase you don’t have real Android devices so If you have real devices you can use it.
- Chrome browser install via Laptop or Macbook
Instructions
- Install APK package to Emulator or Real Devices
Please install APK file via Emulator so the APK should have webview on it if you have a Real device so please install any application via Play Store or install APK file.
2. Connecting Emulator or Real Devices with your Laptop
Incase Emulator please run “adb devices” via terminal/command prompt for checking the devices is connected to the laptop?
Incase use Real devices, please connect USB from devices to the laptop then going to open “USB Debugging” via devices.
Settings > Developer options > turn on USB Debugging
Then please run the command as below.
adb devices
3. Open Chrome Inspect
Open Chrome browser and Easy visit debug webview or debug Mobile web by entering URL as below.
chrome://inspect/#devices
4. Start Debugging Webview via Native app
Launch application and going to webview that you would like to debug so you will see Webview row via Chrome browser as URL: chrome://inspect/#devices
Please clicking on Inspect then the system will open DevTools pop-up. You can check the response and any error from the element and network tab as debugging area.
Conclusion: Chrome Inspect can Debug webview and website via Mobile browser but you have to open Mobile Browser and enter URL of the website and then Chrome inspect will detect the Mobile website URL so you can use like webview inspection.
I hope this article will help you to debug easier and enjoy this article.
If you like this article please clapped for me
Reference: Chrome DevTools
Thai Version: Visit Here