关于WebView切换问题
来源:1-18 原生app和H5进行相互切换代码实战

慕码人2441805
2020-06-08
练习时发现,手机界面存在android.webkit.WebView,但是通过打印driver.contexts,结果只返回[u’NATIVE_APP’]。如果直接定位webView节点中的元素,会报错:selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.
请问这种情况是否是因为webView没有切换成功引起的?实际上我也没找到能够切换的句柄
写回答
1回答
-
无法切换 这个是本身app没有开启webview调试模式。所以你如果没有切换到webview里面你直接去webview里面找元素,肯定会报错
012020-06-09
相似问题