Cant locate webview ids on Webview in mobile native app

Hello support,

Just recently our dev members added id with the Webview for mobile android native app. But i am not able to locate that with appium:

I was able to find the code block from their PR:

        <WebView
            android:id="@+id/personal_information_intro_web_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/activity_horizontal_margin_small"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin_small"
            android:scrollbars="none"
            tools:layout_height="100dp" />

Also attaching the xml of inspector where we only see text locator, no id is present.

#android

Is there something we miss?

It looks like you are just trying to use Inspector. Inspector doesn’t do WebView, on Android give Chrome a try to inspect these elements:

is this still a valid suggestion if the app is native app? @wreed

Yes, you are talking about Webview, right? In Appium scripts you will need to change context to Webview, no way to do that in Inspector. Use Chrome to inspect Webview elements.

i dont think we are talking about the same context. I am looking for attribute of webView in xml bodies (like in the screenshot attached). But will check further the link you shared earlier

Ok, my apologies if I’m not understanding. I’m not sure why and element would be named that if it’s not Webview. Make sure as it’s very important to know for automation.

Did you check parent elements?