question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import name 'webdriver' from Appium on Python

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
KazuCocoacommented, Jun 14, 2019

Could you share the output of your Python script like…: python3 -m your-python-script? and what the result of pip show Appium-Python-Client?

0reactions
hitesh02sharmacommented, Dec 11, 2020

fixed by updating the Appium python client

Read more comments on GitHub >

github_iconTop 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 >
cannot import name 'webdriver' from 'appium' - CSDN博客
文件名不要设置成appium.py.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found