facing issue while importing the name webdriver into my python script

35 views
Skip to first unread message

Deebesh S

unread,
Apr 18, 2018, 5:17:06 AM4/18/18
to Selenium Users
Hello team

I am new to selenium and python as well

I have installed all the files which ever is required but i am facing issue while trying to run the below code 

from selenium import webdriver
from selenium.webdriver.common.keys import keys

driver = webdriver.Firefox()
driver.get("http://www.google.com")
driver.close()

Please find the error below which i am facing

C:\Users\vivek\Desktop\Deepu\Python\Python36\venv\Scripts\python.exe C:/Users/vivek/Desktop/Deepu/Python/Python36/webtest.py
Traceback (most recent call last):
  File "C:/Users/vivek/Desktop/Deepu/Python/Python36/webtest.py", line 4, in <module>
    import webdriver
  File "C:\Users\vivek\Desktop\Deepu\Python\Python36\webdriver.py", line 1, in <module>
    from selenium import webdriver
  File "C:\Users\vivek\Desktop\Deepu\Python\Python36\selenium\webdriver\__init__.py", line 18, in <module>
    from .firefox.webdriver import WebDriver as Firefox  # noqa
  File "C:\Users\vivek\Desktop\Deepu\Python\Python36\selenium\webdriver\firefox\webdriver.py", line 35, in <module>
    from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
  File "C:\Users\vivek\Desktop\Deepu\Python\Python36\selenium\webdriver\remote\webdriver.py", line 26, in <module>
    from .webelement import WebElement
  File "C:\Users\vivek\Desktop\Deepu\Python\Python36\selenium\webdriver\remote\webelement.py", line 25, in <module>
    from selenium.common.exceptions import WebDriverException
ModuleNotFoundError: No module named 'selenium.common'

Process finished with exit code 1


Please can anyone help me to resolve this issue
Reply all
Reply to author
Forward
0 new messages