Firefox硒驱动程序 [英] Firefox driver for selenium

查看:109
本文介绍了Firefox硒驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以下载用于Firefox的硒驱动程序?

where to download the firefox driver for selenium?

我只找到这个文件,而herer不是用于下载
的驱动程序文件 https://code.google.com/p/selenium/wiki/FirefoxDriver

I only find this, and herer is not the driver file for download https://code.google.com/p/selenium/wiki/FirefoxDriver

注意:我已经有用于Firefox的Selenium Webdriver IDE,但是该脚本要求我找到firefox驱动程序
我可以在C#中将firefox用于webdriver还是只能用于Java? / p>

NOTE: I already have Selenium Webdriver IDE for Firefox but the script aks me to find firefox driver Can I use firefox in for webdriver in C# or its only capable for java?

推荐答案

C#项目的最佳方法是安装WebDriver NuGet,因为如果有任何更新,它将得到通知。只需安装NuGet Manager并搜索WebDriver。

The best approach for C# projects is to install the WebDriver NuGet, because if there are any updates it will be notified. Just install NuGet Manager and search for WebDriver.

之后,请使用以下代码:

After that just use the following code:

IWebDriver driverOne = new FirefoxDriver();
IWebDriver driverTwo = new InternetExlorerDriver("C:\\PathToMyIeDriverBinaries\");

NuGet中包含了FirefoxDriver。但是,您需要从此处手动下载ChromeDriver: https://code.google.com / p / selenium / wiki / ChromeDriver

The FirefoxDriver is included in the NuGet. However, you need to download manually the ChromeDriver from here: https://code.google.com/p/selenium/wiki/ChromeDriver

您可以在此处找到包含图像的十分钟教程:
http://automatetheplanet.com/getting-started-webdriver-c-10-minutes/

You can find ten mins tutorial with images here: http://automatetheplanet.com/getting-started-webdriver-c-10-minutes/

这篇关于Firefox硒驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆