UiAutomator producing different outputs for same screen of webview
Reported by
rashmi....@gmail.com,
May 19 2016
|
||||||
Issue descriptionUserAgent: 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
,
May 20 2016
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
,
May 23 2016
,
May 23 2016
Thanks for clarification, routing to WebView team.
,
May 23 2016
What happens if you don't set the setWebContentsDebuggingEnabled flag?
,
May 23 2016
+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.
,
May 24 2016
I have tested the same on Samsung galaxy S6 emulator having 6.0.0[Marshmellow]. It produces the same issue.
,
May 24 2016
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?
,
May 31 2016
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 |
||||||
Comment 1 by dgozman@chromium.org
, May 19 2016