【 Problem description 】
install appium-python-client when , The latest version is installed by default , The original selenium Version has also been upgraded to 4.1.0.selenium4.1.0 Grammar comparison of Selenium3 Something has changed , As a result, some previous code displays are crossed out . If you are not used to it selenium4, Consider using an older version that is more comfortable .
【 Solution 】
see selenium and appium-python-client Version of pip show selenium
pip show appium-python-client
Uninstall the current selenium and appium-python-clientpip uninstall selenium
pip uninstall appium-python-client
Install the specified version of appium-python-clienpip install appium-python-client==1.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
Due to installation appium-python-client At the same time , The system will install matching selenium edition , So install the specified lower version directly here appium-python-client.
appium It's like a service ,appium-python-client It's Jean python Connect appium A driver of services , That's one python Language encapsulation and appium api A library of communication .appium And inherited selenium Of webdriver, therefore appium-python-client The installation may be updated selenium.
After successful installation , The system will prompt the installed appium-python-client、selenium edition .
【appium-python-client edition 】
Access address :https://pypi.org/project/Appium-Python-Client/#history
You can see appium-python-client Each version and release time of , So as to freely choose what you need !