Installing selenium with python using homewbrew

I downloaded selenium to my Mac. I am trying to run a script in python using selenium, but I am getting the error:

Traceback (most recent call last):
File "selenium.py", line 3, in <module>
    from selenium import webdrive
File "/Users/shynds23/python/selenium.py", line 3, in <module>
    from selenium import webdriver
ImportError: cannot import name webdriver

      

My script has the following headers:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
import time

      

Any ideas on how to fix it?

+3


source to share


1 answer


Try loading selenium using pip:

pip install selenium

      

If pip is not installed on your computer, run:



python get-pip.py

      

Here is the link for get-pip:

https://bootstrap.pypa.io/get-pip.py

+1


source







All Articles