Windows7+Python环境安装Selenium及Firefox驱动

2024-11-21 12:29:48

1、在python安装目录下的script目录,按住shift然后单击鼠标右键,就能打开cmd(命令行窗口)窗口。

Windows7+Python环境安装Selenium及Firefox驱动Windows7+Python环境安装Selenium及Firefox驱动

3、安装完selenium后,接下来就是浏览器驱动的安装了。笔者只演示了Firefox驱动的安装,其它浏览器驱动与此相同。下载完成后进行解压,然后将geckodriver.exe分别移动到python根目录和Firefox的根目录即可。

Windows7+Python环境安装Selenium及Firefox驱动Windows7+Python环境安装Selenium及Firefox驱动

4、到现在安装工作都做完了,打开python的IDLE进行测试。如下图:

Windows7+Python环境安装Selenium及Firefox驱动
猜你喜欢