chromedriver的版本不对 应该装 模拟器或者真机内置的浏览器,输入一下网址可以查看版本:https://liulanmi.com/labs/core.html
print(self.driver.contexts) # NATIVE_APP 说明没有开启webview开关 如果是 类似于['NATIVE_APP','WEBVIEW_com.ekwing.students']说明开启了 webview
contexts = self.driver.contexts
print(contexts)
# self.driver.switch_to
print("