selenium火狐驱动_在Selenium Firefox驱动程序上运行测试

Selenium 3.0引入了GeckoDriver,用于与Firefox交互。Gecko是Mozilla开发的浏览器引擎,而GeckoDriver是Selenium与Firefox之间的桥梁。在没有GeckoDriver的情况下,Selenium测试会抛出异常。要使用GeckoDriver,需要下载对应操作系统的版本,设置系统路径或环境变量,然后通过System.setProperty初始化。
摘要由CSDN通过智能技术生成

selenium火狐驱动

带有Selenium 3.0的Gecko Marionette Firefox驱动程序 (Gecko Marionette Firefox Driver with Selenium 3.0)

Many of you know that before Selenium 3, Mozilla Firefox browser was the default browser for Selenium where we launch Firefox by default without any property settings. After Selenium 3.0 has been released in the market and in this version of Selenium, testers need to initialize the script to use Firefox using GeckoDriver explicitly.

你们中的许多人都知道,在Selenium 3之前,Mozilla Firefox浏览器是Selenium的默认浏览器,在默认情况下,我们在没有任何属性设置的情况下启动Firefox。 在市场上以及此版本的Selenium中发布Selenium 3.0之后,测试人员需要使用GeckoDriver显式初始化脚本以使用Firefox。

什么是壁虎? (What is Gecko?)

Gecko is a web browser engine which is developed by Mozilla Foundation and written in C++. It is an Open Source. Web browser engine is a software program that is used to control and render the content (like HTML, CSS, XML, images) on the browser.

Gecko是由Mozilla Foundation开发并用C ++编写的Web浏览器引擎 。 它是一个开源的。 Web浏览器引擎是一种软件程序,用于控制和呈现浏览器上的内容(如HTML,CSS,XML,图像)。

什么是壁虎驱动程序? (What is Gecko Driver?)

Gecko is a Web Browser engine used in various applications developed by Mozilla Foundation and the Mozilla Corporation. It is a proxy which is used to interact with the browsers that run on Gecko-based browsers like Firefox. Gecko driver is the link between your tests in Selenium WebDriver and Mozilla Firefox browser. As Selenium 3.0 will not have any native implementation of Firefox, we need to direct all the driver commands through Gecko Driver. Gecko Driver is an executable file that you need to have in one of the system paths before running your tests.
The Firefox browser implements the WebDriver protocol using an executable called GeckoDriver.exe. Selenium uses WebDriver protocol to send requests to GeckoDriver, which translates calls into the Marionette automation protocol and Firefox will understand the commands transmitted in the form of Marionette protocol and executes them.

Gecko是Web浏览器引擎,可用于Mozilla Foundation和Mozilla Corporation开发的各种应用程序。 它是一个代理,用于与在基于Gecko的浏览器(如Firefox)上运行的浏览器进行交互。 Gecko驱动程序是Selenium WebDriver和Mozilla Firefox浏览器之间的测试之间的链接。 由于Selenium 3.0将不具有Firefox的任何本机实现,因此我们需要通过Gecko Driver定向所有驱动程序命令。 Gecko驱动程序是一个可执行文件,在运行测试之前,您需要将其放置在系统路径之一中。
Firefox浏览器使用名为GeckoDriver.exe的可执行文件来实现WebDriver协议。 Selenium使用WebDriver协议将请求发送到GeckoDriver,后者将呼叫转换为Marionette自动化协议

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值