解决办法:
1、切换到webView,对页面源码进行打印
# self.driver.switch_to.context("WEBVIEW_xweb") # print(self.driver.context) p = self.driver.page_source with open(‘123.html‘,‘wb‘) as f: f.write(p.encode(‘utf-8‘))
2022-05-01 05:11:16
解决办法:
1、切换到webView,对页面源码进行打印
# self.driver.switch_to.context("WEBVIEW_xweb") # print(self.driver.context) p = self.driver.page_source with open(‘123.html‘,‘wb‘) as f: f.write(p.encode(‘utf-8‘))