开发者选项
=>WebView实现
中是不是使用了Chrome
,而不是Android System WebView
运行webview demo报错
log: 测试用例:WebViewTest 所有者:Administrator 优先级:High 超时:5分钟 步骤1: 1、登录Android demo,进入网页视图 RESOURCE: acquire resource (res_type:android, res_group:None, condition:{}) successfully 172.16.0.227:5555(google Nexus 5 armeabi-v7a Android 6.0.1) ENVIRONMENT: 申请 Android 设备成功:google Nexus 5(172.16.0.227:5555) Hello GetControl GetControlVisibility EnableSoftInput SetControlText GetControl GetControlVisibility EnableSoftInput SetControlText GetControl GetControlVisibility GetObjectFieldValue GetControlRect GetControlRect Click INFO: 登录完成 GetControl GetControlVisibility GetObjectFieldValue GetControlRect GetControlRect Click 步骤2: 2、检查网页标题 GetControl EvalScript CRITICAL: run_test执行失败 Traceback (most recent call last): File "D:\Python36\lib\site-packages\qt4a\andrcontrols.py", line 1702, in eval_script return self._driver.eval_script(self.hashcode, frame_xpaths, script) File "D:\Python36\lib\site-packages\qt4a\androiddriver\androiddriver.py", line 824, in eval_script result = self.send_command(EnumCommand.CmdEvalScript, Control=control, Script=script, Frame=frame_xpaths) File "D:\Python36\lib\site-packages\qt4a\androiddriver\androiddriver.py", line 504, in send_command raise AndroidSpyError(result['Error']) qt4a.androiddriver.util.AndroidSpyError: java.lang.RuntimeException: java.lang.RuntimeException: Get Field mAwContents Failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Python36\lib\site-packages\testbase\testcase.py", line 701, in _thread_run getattr(self._testcase, it)() File "E:/QT4ADemoProj-master/demotest/webview.py", line 35, in run_test demo_webpage = DemoWebPage(demo_webpanel.Controls["webview"]) File "D:\Python36\lib\site-packages\qt4w\webcontrols.py", line 1058, in init if wait_for_ready: self.wait_for_ready() File "D:\Python36\lib\site-packages\qt4w\webcontrols.py", line 1125, in wait_for_ready if self.ready_state == 'complete': return File "D:\Python36\lib\site-packages\qt4w\webcontrols.py", line 1100, in ready_state return self.exec_script('document.readyState') File "D:\Python36\lib\site-packages\qt4w\util.py", line 144, in wrap_func ret = func(args, *kwargs) File "D:\Python36\lib\site-packages\qt4w\webcontrols.py", line 1147, in exec_script return self._webdriver.eval_script(self._locator, script) File "D:\Python36\lib\site-packages\qt4a\androiddriver\webdriver.py", line 2080, in eval_script raise e File "D:\Python36\lib\site-packages\qt4a\androiddriver\webdriver.py", line 2065, in eval_script return super(AndroidWebDriver, self).eval_script(frame_xpaths, script) File "D:\Python36\lib\site-packages\qt4w\webdriver\webdriver.py", line 412, in eval_script raise e File "D:\Python36\lib\site-packages\qt4w\webdriver\webdriver.py", line 395, in eval_script return self._webview.eval_script(frame_xpaths, script) File "D:\Python36\lib\site-packages\qt4a\andrcontrols.py", line 1759, in eval_script return self.webview_impl.eval_script(frame_xpaths, script) File "D:\Python36\lib\site-packages\qt4a\andrcontrols.py", line 1711, in eval_script raise JavaScriptError(frame_xpaths, e.args[0]) qt4w.util.JavaScriptError: []java.lang.RuntimeException: java.lang.RuntimeException: Get Field mAwContents Failed
172.16.0.227:5555的截图:E:\QT4ADemoProj-master\demotest\WebViewTest_172.16.0.227_5555_1551148419.4499266.png CRITICAL: post_test执行失败 Traceback (most recent call last): File "D:\Python36\lib\site-packages\testbase\testcase.py", line 701, in _thread_run getattr(self._testcase, it)() File "E:\QT4ADemoProj-master\demolib\demotestbase.py", line 17, in post_test super(DemoTestBase, self).post_test() File "D:\Python36\lib\site-packages\qt4a\androidtestbase.py", line 83, in post_test self._save_logcat() File "D:\Python36\lib\site-packages\qt4a\androidtestbase.py", line 250, in _save_logcat device.adb.save_log(log_path) File "D:\Python36\lib\site-packages\qt4a\androiddriver\adb.py", line 442, in save_log f.write('\n'.join(log_list)) UnicodeEncodeError: 'gbk' codec can't encode character '\u0402' in position 88914: illegal multibyte sequence
User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/M4B30X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
该提问来源于开源项目:Tencent/QT4A
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
4条回答
为你推荐
- eclipse项目无法通过Android studio里面的webview控件显示页面 报错net::error_connection_refused
- webview重定向到jsbridge怎么解决?
- android webView 修改页面字体颜色
- 首页activity中的fragment加载webview
- webview
- 2个回答
- webview 调用 js 为什么无效
- webview
- javascript
- 3个回答
- webview加载h5页面,加权限报错
- android
- 3个回答
- Android Webview文字选择
- 关于webview申请授权的问题?
- webview
- 3个回答
- ScrollView嵌套的WebView设置缩放卡顿
- 关于安卓的Webview问题
- 在安卓6.0上,使用webview
- 安卓webview如何在线预览文件?
- webview webview webview
- webview
- 2个回答
- Android webview在线PDF预览
- Android webview布局
- 求助,为什么android项目的xml文件的webview标签的android id报错
- android
- 3个回答
- android webview内容超出屏幕宽度
- webview
- 1个回答
- Android webview 返回问题
- android webview视频不能播放
- Android如何修改webview默认出错页面