'''切换到web页面''' def ToWeb(self): d = self.baseFind.driver cons = d.contexts # 所有的上下文对象 for con in cons: if con.lower().startswith('webview'): d._switch_to.context(con) print('切换成功') '''切换到本地页面''' def ToNative(self): d = self.baseFind.driver cons = d.contexts # 所有的上下文对象 for con in cons: if con.lower().startswith('native'): d._switch_to.context(con) print('切换成功')
python 切换web页面或者本地页面
最新推荐文章于 2025-02-20 10:10:30 发布