Appium中使用H5页面无法切换环境

1.定位app的H5页面,使用 contexts = self.driver.contexts 打印print(contexts)  发现结果只有natives,

原因为要开发在打包时,开启webview的debug属性setWebContentDebuggingEnabled(true)

2.在调起app时必须加上 desired_caps['chromeOptions']={'androidProcess': '包名:tools'}

3.使用Chrome后页面为空白页,需要FQ~

posted on 2019-06-04 18:39  进击的麻瓜  阅读(419)  评论(0编辑  收藏  举报