selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command.
Original error: No Chromedriver found that can automate Chrome '52.0.2743
这个意思是没有 chromedriver ?还是什么意思?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from appium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
desired_caps = {}
desired_caps['platformName'] = 'android'
desired_caps['platformVersion'] = '6.0.1'
desired_caps['deviceName'] = '127.0.0.1:7555'
desired_caps["unicodeKeyboard"] = 'True' #声明中文
desired_caps["resetKeyboard"] = 'True' #声明中文,否则不支持中文
# desired_caps['noReset'] = 'True' #执行时不初始化
desired_caps['appPackage'] = 'com.wondershare.drfone'
desired_caps['appActivity'] = 'com.wondershare.drfone.ui.activity.WelcomeActivity'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
driver.implicitly_wait(3)
driver.find_element_by_id('com.wondershare.drfone:id/btnBackup').click()
WebDriverWait(driver,8).until(lambda x:x.find_element_by_id('com.wondershare.drfone:id/btnRecoverData'))
driver.find_element_by_id('com.wondershare.drfone:id/btnRecoverData').click()
WebDriverWait(driver,8).until(lambda x:x.find_element_by_class_name('android.webkit.WebView'))
contexts=driver.contexts
print(contexts)
driver.switch_to.context('WEBVIEW_com.wondershare.drfone')
driver.find_element_by_id('email').send_keys('3310dfd8dfd96@163.com')
driver.find_element_by_class_name('android.widget.Button').click()
driver.switch_to.context('NATIVE_APP')
driver.find_element_by_id('android.widget.ImageButton').click()