运行硒问题

时间:2019-12-06 03:23:16

标签: python selenium

我已经在Python(Python 3.7.4)上安装了PIP和硒。请看下面。问题是,当我在IDLE中运行代码时,它显示以下错误:请帮助!

更多,当我转到C驱动器时,我列出了webdriver。该代码是否已经运行,因为Web驱动程序已经可用?

c:\Users\DESHARMA\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\selenium\webdriver\firefox

CODE是

from selenium import webdriver
from selenium.webdriver.common.keys import keys
driver=webdriver.Firefox()
driver.get("http://www.python.org")

错误说明:

 RESTART: C:/Users/DESHARMA/AppData/Local/Programs/Python/Python37/Install_Selenium.py 
Traceback (most recent call last):
  File "C:/Users/DESHARMA/AppData/Local/Programs/Python/Python37/Install_Selenium.py", line 1, in <module>
    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

PIP版本

pip --version

pip 19.3.1 from c:\users\desharma\appdata\local\programs\python\python37-32\lib\site-packages\pip (python 3.7)

PIP重新安装

C:\Users\DESHARMA>pip install selenium

Requirement already satisfied: selenium in c:\users\desharma\appdata\local\programs\python\python37-32\lib\site-packages (3.141.0)

0 个答案:

没有答案