Python 3.10
I am making a script with Appium and Selenium.
TouchAction and ActionChains are deprecated in Selenium 4. So I had to downgrade Selenium to version 3.
But then I get this error when I run my script :
Traceback (most recent call last):
File "C:\Users\gauth\Documents\Projet\Projet_debug3\Projet.py", line 347, in <module>
from modules import prepare_envir_appium
File "C:\Users\gauth\Documents\Projet\Projet_debug3\modules\prepare_envir_appium.py", line 24, in <module>
import modules.mymodulesteam as mymodulesteam
File "C:\Users\gauth\Documents\Projet\Projet_debug3\modules\mymodulesteam.py", line 31, in <module>
import appium.webdriver.common.touch_action
File "C:\Users\gauth\AppData\Local\Programs\Python\Python310\lib\site-packages\appium\webdriver\__init__.py", line 19, in <module>
from .webdriver import WebDriver as Remote
File "C:\Users\gauth\AppData\Local\Programs\Python\Python310\lib\site-packages\appium\webdriver\webdriver.py", line 26, in <module>
from appium.options.common.base import AppiumOptions
File "C:\Users\gauth\AppData\Local\Programs\Python\Python310\lib\site-packages\appium\options\common\__init__.py", line 1, in <module>
from .base import AppiumOptions
File "C:\Users\gauth\AppData\Local\Programs\Python\Python310\lib\site-packages\appium\options\common\base.py", line 21, in <module>
from selenium.webdriver.common.options import BaseOptions
ModuleNotFoundError: No module named 'selenium.webdriver.common.options'
The line 31 in my script “C:\Users\gauth\Documents\Projet\Projet_debug3\modules\mymodulesteam.py” is :
from appium.webdriver.common.touch_action import TouchAction
So I had the idea to uninstall Appium and reinstall it in order to make work packages of both Appium and Selenium 3.
But when I install Appium with:
python -m pip install Appium-Python-Client
It uninstalled Selenium 3 and install Selenium 4. So my question is “How can I install Appium with Selenium 3”. How can I fix this issue and make work my script again?