前提条件: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‘)
切换一直无法发现打开的页,求解决方案