Cannot import name 'webdriver' from Appium on Python
See original GitHub issueThe problem
The issue I am encountering is that despite having downloaded appium and installing the appium-python-client, when I run the code you have on your documentation(specifically the code snippet found here: https://github.com/appium/python-client#usage ), I get the error : “cannot import name ‘webdriver’ from ‘appium’”
Environment
I installed the appium python client using pip install appium-python-client, I have appium-python-client-0.44. I am using Windows 10 and Python 3.7.2 I am using nodeJS v10.15.3 and appium v1.13.0 I am using the Android platform on a real device.
Details
My problem is that I can’t import WebDriver from Appium despite a Webdriver folder existing inside the Appium package in Lib/site-packages
Code To reproduce issue
import unittest
from appium import webdriver
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '9'
desired_caps['automationName'] = 'uiautomator2'
desired_caps['deviceName'] = 'OnePlox'
desired_caps['app'] = 'C:/Users/hadin/Desktop/ApiDemos-debug.apk'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Cannot import name 'webdriver' from Appium on Python
@LinFelix the error is occurring on the second line when I go to import webdriver from appium. It says "ImportError: cannot import name...
Read more >ImportError: No module named appium - Google Groups
Python was already installed in my machine and Installed Appium GUI 1.1.0. ... run iOs_simple.py, I am getting error "ImportError: No module named...
Read more >How to install Appium with selenium 3 (not 4) in Python?
Python 3.10 I am making a script with Appium and Selenium. ... ModuleNotFoundError: No module named 'selenium.webdriver.common.options'.
Read more >webdriver.common package — Python client ... - GitHub Pages
Please use 'from appium.webdriver.common.appiumby import AppiumBy' instead of 'MobileBy'. webdriver.common.multi_action module ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Could you share the output of your Python script like…:
python3 -m your-python-script
? and what the result ofpip show Appium-Python-Client
?fixed by updating the Appium python client