使用Marionette FirefoxDriver代替旧的Selenium FirefoxDriver作为Selenium测试仪有什么好处? [英] What are the benefits of using Marionette FirefoxDriver instead of the old Selenium FirefoxDriver for a Selenium tester?

查看:82
本文介绍了使用Marionette FirefoxDriver代替旧的Selenium FirefoxDriver作为Selenium测试仪有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上周,关于这款名为Marionette的新FirefoxDriver的声音很多.要将Firefox与Selenium一起使用,我们曾经使用旧的" Selenium FirefoxDriver.从Firefox 48.0开始,将需要使用由Mozilla开发的此新FirefoxDriver.

Last weeks there has been a lot of noise about this new FirefoxDriver called Marionette. To use Firefox with Selenium, we used to use the "old" Selenium FirefoxDriver. From Firefox 48.0 onwards it is going to be required to use this new FirefoxDriver developed by Mozilla.

我知道有必要改变这个方向,以使每个浏览器都支持和开发其驱动程序,并获得独立于Selenium的驱动程序.此外,假设Mozilla开发自己的驱动程序,将可以更快,更轻松地解决问题和开发功能.

I understand it is required to change to that direction to get every browser supports and develops its drivers and to get drivers independent of Selenium. Besides, it is supposed if Mozilla develops its own driver, it will be faster and easier to fix issues and to develop features.

我的问题是,对于那些使用Selenium框架创建自动化测试的人来说,使用Marionette代替旧的" Selenium支持的FirefoxDriver有什么好处吗? _(例如,性能更好,更好的兼容性...)

My question is, for those who create automated tests using Selenium framework, is there any benefit of using Marionette instead of the "old" Selenium supported FirefoxDriver? _(Such as a better performance, a better compatibility...)

推荐答案

使用Mozilla提供的基于Marionette的Geckodriver解决方案的主要优点是,它适用于Firefox 48及更高版本. Selenium项目提供和维护的旧版驱动程序不适用于Firefox 48或更高版本,并且永远不适用于那些版本的Firefox.

The main advantage for using the Mozilla-provided, Marionette-based Geckodriver solution is that it works for versions of Firefox 48 and higher. The legacy driver provided and maintained by the Selenium project doesn't work for Firefox 48 or higher, and will never work for those versions of Firefox.

旧版驱动程序实现为Firefox扩展.当WebDriver启动Firefox时,此扩展名将安装在驱动程序使用的配置文件中. Firefox 48引入了两个禁用此浏览器扩展的新功能.第一个是所谓的电解"功能,即多进程Firefox.电解改变了Selenium团队没有花时间充分理解扩展程序处理浏览器的方式.

The legacy driver is implemented as a Firefox extension. This extension is installed in the profile used by the driver when WebDriver launches Firefox. Firefox 48 introduced two new features that disabled this browser extension. The first is the so-called "electrolysis" feature, or multiprocess Firefox. Electrolysis changes the way extensions have to deal with the browser in ways the Selenium team has not taken the time to fully understand.

第二个更重要的要求是,所有浏览器扩展都必须由Mozilla签名,然后才能加载浏览器.后一个功能已在Firefox中提供了多个版本,但是从48开始,它不再被禁用. WebDriver浏览器扩展为Firefox浏览器引入了几个有效的安全问题,因此,Mozilla的安全团队不会对其进行签名.反过来,这使扩展程序无法使用,因此Selenium无法再与Firefox通信.首先由Mozilla开发和维护的基于Marionette的解决方案很受它们的青睐,可用于Firefox的自动化,因此承诺将继续与未来的版本一起使用.

The second, more important requirement is that all browser extensions must be signed by Mozilla before the browser will allow them to load. This latter feature has been in Firefox for several versions, but beginning with 48, it can no longer be disabled. The WebDriver browser extension introduces several valid security concerns for the Firefox browser, and as such, will not be signed by Mozilla's security team. This, in turn, renders the extension inoperable, and thus Selenium can no longer communicate with Firefox. The Marionette-based solution, being developed and maintained by Mozilla in the first place, is blessed by them for use in automating Firefox, and as such carries a commitment that it will continue to work with future versions moving forward.

因此,将Marionette与Firefox 48及更高版本一起使用的主要好处是它可以工作,而其他解决方案则不能.

So the primary benefit of using Marionette with Firefox 48 and higher is that it will work, whereas other solutions won't.

这篇关于使用Marionette FirefoxDriver代替旧的Selenium FirefoxDriver作为Selenium测试仪有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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