Conditions to Inspect WebView Elements

 Conditions to Inspect WebView Elements
We can use Chrome DevTools to debug and inspect WebView content in Android applications.

1)It requires Android version 4.4 or later i.e. API level >=19.
2)WebView debugging should be enabled; developer must enable ‘setWebContentsDebuggingEnabled’ 
flag in the WebView class. This flag enables debugging of web contents (HTML / CSS / JavaScript) 
loaded into any WebViews of app.
3)Chrome browser with version 32 or greater to be installed on desktop and Android device and
 DESKTOP_ANDROID_CHROME_BROWSER_VERSION >=   ANDROID_DEVICE _CHROME_BROWSER_VERSION
4)In addition to this, Appium during automation recognize the WebView context only if webview
 debugging is enabled from within app. We can inspect webview on LOLLIPOP / KITKAT Android devices.
5)Appium also uses Selendroid under the hood for webview support on devices older than 4.4. To 
use this feature of appium, it is mandatory to specify “automationName” as “selendroid” in 
desired capabilities passed to Appium server. If our hybrid app under test is build in such a 
way that it supports minimum Android version 4.0.4 (API Level 14) and max Android version 4.3 
(API level 18) then we can inspect webview elements and execute our automation tests using selendroid mode of appium.