New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 613151 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

UiAutomator producing different outputs for same screen of webview

Reported by rashmi....@gmail.com, May 19 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

Steps to reproduce the problem:
1.Launch any hybrid app without setWebContentsDebuggingEnabled true flag being set 
2. Open screen with webview to inspect elements under webview
3. Once it shows the child elements and once it doesn't

What is the expected behavior?
The output shown by UiAutomator from Android SDK should be uniform irrespective of the no.of times we open a screen

What went wrong?
Since we are automating an already developed chinese bank APK, we cannot set any flag in webview to inspect its elements in Chrome ADB. Hence we are dependent on UiAutomator. It shows just android.widget.WebView once and in the next run, it shows the elements within the webview for the same screen and on the same device. Please find the attached images

Test Device : Genymotion emulator MotoX 4.4.4

Did this work before? Yes The performance is very intermittent and difficult to reproduce.

Chrome version: 50.0.2661.102  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0

Would be happy if I get some recognition for the bug I raised
 
Elements_page.png
144 KB View Download
Webview_output.png
137 KB View Download
Is this about Chrome DevTools or something else?
Hello dgozman, this is regarding Android SDK's tool called UiAutomator, which comes built in with Android package. I had earlier reported to Android forum https://code.google.com/p/android/issues/detail?id=210132 and they asked that the issue deals with WebView which comes under Chromium. Hence reporting here. I am getting different outputs while inspecting android WebView for the same screen on same device
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Components: -Platform>DevTools Mobile>WebView
Owner: ----
Status: Untriaged (was: Assigned)
Thanks for clarification, routing to WebView team.

Comment 5 by sgu...@chromium.org, May 23 2016

Cc: mikec...@chromium.org yolandyan@chromium.org
What happens if you don't set the setWebContentsDebuggingEnabled flag?
Cc: jayker@google.com
+jayker

We've seen this same thing happen with Chrome. I think newer builds of Android (M for example) work much better with web content for uiautomator.

You may also want to look into using Espresso, https://google.github.io/android-testing-support-library/docs/espresso/, if that is an option for you.
I have tested the same on Samsung galaxy S6 emulator having 6.0.0[Marshmellow]. It produces the same issue.
Since the developer has not set 'setWebContentsDebuggingEnabled' flag, I am not able to inspect elements in chrome ADB. Does espresso allow us to inspect webview elements without the flag being set?

Comment 9 by boliu@chromium.org, May 31 2016

Status: WontFix (was: Untriaged)
Is this really a problem? Why not just wait for the elements within webview to become available before proceeding with the test?

Also this would be a uiautomator bug. I'm guessing it's using accessibility APIs to access webview elements. Nothing webview can do to affect that.

Sign in to add a comment