混合app contexts切换上下文时报错

前提条件:android 华为荣耀手机         测试app:混合应用(webview:腾讯x5内核)

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages

contexts = self.driver.contexts
print(‘context=‘, contexts)

context= [‘NATIVE_APP‘, ‘WEBVIEW_com.XXXX.XXXX‘, ‘WEBVIEW_com.XXXX.XXXX:xg_service_v4‘, ‘WEBVIEW_com.tencent.mm‘]

self.driver.switch_to.context(‘WEBVIEW_com.XXXX.XXXX‘)

切换一直无法发现打开的页,求解决方案

混合app contexts切换上下文时报错

上一篇:A New Recurrence-Network-Based Time Series Analysis Approach for Characterizing System Dynamics - Guangyu Yang, Daolin Xu * and Haicheng Zhang


下一篇:android只设置部分控件随着软键盘的出现而腾出空间