I have recently started automation testing in android and was using UiAutomator tool for inspecting UI elements. Surprisingly, I came across two different responses for Webview elements for the same screen and same device [Genymotion MotoX 4.4.4]. Attached are the screenshots for the same. We all know that appium has an issue with inspecting webview elements who do not carry "setWebContentsDebuggingEnabled" to true. Is this a bug in UiAutomator?
答案 0 :(得分:2)
我们都知道appium在检查webview元素时存在问题 谁不携带" setWebContentsDebuggingEnabled"为真。这是一个 UiAutomator中的错误?
否,这不是一个错误。它是一个 IMPLEMENTATION 。除非setWebContentsDebuggingEnabled
设置为true
,否则您无法调试或访问Web视图中的任何元素。
void setWebContentsDebuggingEnabled(已启用布尔值)
启用 调试加载到任何内容的Web内容(HTML / CSS / JavaScript) 此应用程序的WebViews。可以启用此标志以便 便于调试内部运行的Web布局和JavaScript代码 网页视图。有关调试,请参阅WebView文档 指南。默认值为false。
您可能也对这些感兴趣: