【随手记】Python+selenium环境搭建报错

python下安装可以直接 cmd 命令pip install selenium

但是再pycharm中,会出现识别不了selenium 所以可以在setting中自己手动加进去。 【随手记】Python+selenium环境搭建报错

然后又报错

D:\python\Environment\Scripts\python.exe D:/python/Environment/webdriver.py
Traceback (most recent call last):
  File "D:/python/Environment/webdriver.py", line 4, in <module>
    wd = webdriver.chrome(executable_path=driver)
TypeError: 'module' object is not callable

Process finished with exit code 1
 

【随手记】Python+selenium环境搭建报错

错误原因:chrome()要改成Chrome()

成功运行