博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
selenium 火狐版本_安装Selenium快速指南(Firefox版本)
阅读量:2520 次
发布时间:2019-05-11

本文共 1480 字,大约阅读时间需要 4 分钟。

selenium 火狐版本



To set up Selenium, you’ll first need to have Python installed. Check out my if you need help with that.

要设置Selenium,首先需要安装Python。 查看我的 如果您需要帮助。

Next, you need to install Selenium. To do this, simply open up your Windows command prompt or Mac/Linux terminal and type:

接下来,您需要安装Selenium。 为此,只需打开Windows命令提示符或Mac / Linux终端,然后键入:

pip install selenium

Now that Selenium is installed, you need to pick a web browser for Selenium to use. Firefox and Chrome are both just as easy to use with Selenium, but here we’ll look at using Firefox. Assuming you have the Firefox browser installed on your machine, go to the following webpage:

现在已经安装了Selenium,您需要选择一个Web浏览器供Selenium使用。 Firefox和Chrome都可以与Selenium一起轻松使用,但在这里我们将介绍如何使用Firefox。 假设您的计算机上已安装Firefox浏览器,请转到以下网页:

Click to download the appropriate “gecko driver” zip file for your machine. Unzip the driver and move it to whatever place in your file system you prefer. Just keep in mind you will need to reference the gecko driver’s location when you use Selenium.

单击以下载适合您的计算机的“ gecko驱动程序” zip文件。 解压缩驱动程序并将其移动到文件系统中您喜欢的任何位置。 请记住,使用Selenium时,您需要参考壁虎驱动程序的位置。

Finally, to make sure everything is working as it should, run this code:

最后,要确保一切正常,请运行以下代码:

from selenium import webdriver# your executable path is wherever you saved the gecko webdrivergeckodriver = "C:UsersgstantonDownloadsgeckodriver.exe"browser = webdriver.Firefox(executable_path=geckodriver)url = "https://www.duckduckgo.com"browser.get(url)

翻译自:

selenium 火狐版本

转载地址:http://xeqwd.baihongyu.com/

你可能感兴趣的文章
python3安装scrapy
查看>>
Git(四) - 分支管理
查看>>
PHP Curl发送数据
查看>>
HTTP协议
查看>>
CentOS7 重置root密码
查看>>
Centos安装Python3
查看>>
PHP批量插入
查看>>
laravel连接sql server 2008
查看>>
Laravel框架学习笔记之任务调度(定时任务)
查看>>
Laravel 的生命周期
查看>>
Nginx
查看>>
Navicat远程连接云主机数据库
查看>>
Nginx配置文件nginx.conf中文详解(总结)
查看>>
jxl写入excel实现数据导出功能
查看>>
linux文件目录类命令|--cp指令
查看>>
.net MVC 404错误解决方法
查看>>
linux系统目录结构
查看>>
git
查看>>
Entity Framework 4.3.1 级联删除
查看>>
codevs 1163:访问艺术馆
查看>>