GVKun编程网logo

FirefoxDriver始终在“ firstrun”页面上启动,破坏所有测试脚本(firefox already running)

23

以上就是给各位分享FirefoxDriver始终在“firstrun”页面上启动,破坏所有测试脚本,其中也会对firefoxalreadyrunning进行解释,同时本文还将给你拓展chromedri

以上就是给各位分享FirefoxDriver始终在“ firstrun”页面上启动,破坏所有测试脚本,其中也会对firefox already running进行解释,同时本文还将给你拓展chromedriver、firefox-geckodriver、iedriver 下载链接、Firefox 57 更名 Firefox Quantum,速度是 Firefox 52 两倍、Firefox WebDriver不适用于Firefox 32、Firefox 与 geckodriver 版本兼容问题等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

FirefoxDriver始终在“ firstrun”页面上启动,破坏所有测试脚本(firefox already running)

FirefoxDriver始终在“ firstrun”页面上启动,破坏所有测试脚本(firefox already running)

从昨晚开始,FirefoxDriver一直在以下页面上打开:https://www.mozilla.org/en-US/firefox/42.0/firstrun/learnmore/。我尝试更改默认配置文件设置,但未成功。

下面的问题http://stackoverflow.com/questions/33937067/firefox-webdriver-opens-first-run-page-all-the-time类似,但是我看不到在哪里实现这四行代码,而且我个人将其扔到脚本中的尝试被证明是徒劳的。

昨天晚上,这个问题突然开始了。我今天有演讲要做,但我的脚本无法正常工作。

像这样实例化我的WebDriver实例将导致NoSuchMethodError:

                FirefoxProfile profile = new FirefoxProfile();                profile.setPreference("browser.startup.homepage", "about:blank");                profile.setPreference("startup.homepage_welcome_url", "about:blank");                profile.setPreference("startup.homepage_welcome_url.additional", "about:blank");                driver = new FirefoxDriver(profile);                driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

但摆脱profileFirefoxDriver把它带回给firstrun页上面提到的。

答案1

小编典典

使用“ Firefox.exe-p”转到配置文件管理器

您将拥有多个配置文件。请选择默认配置文件,并将其始终设为默认配置文件。

它不应打开该页面。我测试了,它工作正常。

您可以尝试此代码。我很确定它会起作用。

    ProfilesIni profile = new ProfilesIni();    FirefoxProfile ffprofile = profile.getProfile("default");    WebDriver driver = new FirefoxDriver(ffprofile);    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

chromedriver、firefox-geckodriver、iedriver 下载链接

chromedriver、firefox-geckodriver、iedriver 下载链接

来源:https://www.cnblogs.com/givemelove/p/8482361.html

1. 所有版本 chrome 下载

是不是很难找到老版本的 chrome?博主收集了几个下载 chrome 老版本的网站,其中哪个下载的是原版的就不得而知了。

http://www.slimjet.com/chrome/google-chrome-old-version.php

http://google_chrome.en.downloadastro.com/old_versions/

http://filehippo.com/zh/download_google_chrome/

http://www.chromedownloads.net/

下面这个网址大多是 Mac 的多些,Windows 下的很缺,但是有好多其他的软件下载,可以去看看:uptodown

2. 所有版本 firefox 下载

火狐相对比较容易找,这里也贴出来其 ftp 链接:

http://ftp.mozilla.org/pub/firefox/releases/

geckodriver 下载地址

https://github.com/mozilla/geckodriver/releases

至于火狐的版本与 selenium 的对应关系,确实没有这方面合适的资料,不过建议 selenium 2.53 以及以下的朋友,用 47 以下的火狐。

3. 所有版本 chromedriver 下载

chromedriver 的版本也不容易找:

http://chromedriver.storage.googleapis.com/index.html

其中各版本下的 notes.txt 中说明了该版本以及以前一些版本支持的 chrome 浏览器版本,不过,老司机早就给你整理了一份一目了然的表格:

selenium 之 chromedriver 与 chrome 版本映射表

这样,该下载哪个版本的 chrome 与 chromedriver 是不是就很清楚了。

4. 所有版本 selenium 以及 IEDriverServer 下载

最后,当然还有 selenium 和 IEDriverServer,Python 版的 selenium 直接 pip 就可以了,下面的链接里主要是 Java 版的和.NET 版的:

http://selenium-release.storage.googleapis.com/index.html

 

 

 

安装三大浏览器驱动 driver
     1.chromedriver 下载地址:https://code.google.com/p/chromedriver/downloads/list
     2.Firefox 的驱动 geckodriver 下载地址:https://github.com/mozilla/geckodriver/releases/
     3.IE 的驱动 IEdriver 下载地址:http://www.nuget.org/packages/Selenium.WebDriver.IEDriver/

原文:https://blog.csdn.net/azsx02/article/details/68947429

Firefox 57 更名 Firefox Quantum,速度是 Firefox 52 两倍

Firefox 57 更名 Firefox Quantum,速度是 Firefox 52 两倍

今天,Mozilla将Firefox 57浏览器作为Beta版发布,并正式将其命名为Firefox Quantum。该品牌还包括一个新的标志。Mozilla表示,引擎在浏览器中很重要。这就是为什么Mozilla正在发布一个全新的Firefox Beta版,一个完全重新发明的现代化引擎。由于Firefox 57这个名称不能真正传达我们所做出的更改,而且这款新Firefox浏览器速度要快得多,所以称之为Firefox Quantum。

Mozilla表示,Firefox Quantum浏览器速度是Firefox 52的两倍。它能够通过使用Rust语言来重建组件提高浏览器的速度,这些组件现在更有效率。 Firefox历史版本仅在一个CPU核心上运行任务,但在Quantum及更高版本中,它将利用多个CPU核心,从而使浏览器速度更快。

通过使用Rust编写的新CSS引擎,Firefox可以并行使用多个CPU来缩短加载时间,Mozilla声称没有其他浏览器可以执行此操作。为了进一步提高速度,Mozilla将用户打开的选项卡放在首位,并且采用多进程架构。 Firefox Quantum在某些网站上的打开速度超过Chrome,同时使用的内存减少30%。该团队还修复了468个浏览器问题,这可能会导致速度上升。

稿源:cnbeta.com

Firefox WebDriver不适用于Firefox 32

Firefox WebDriver不适用于Firefox 32

我刚刚更新到Firefox 32,当我尝试运行Selenium Webdriver Test时,我得到以下信息

Failed to start up socket within 45000 ms. Attempted to connect to thefollowing addresses: 127.0.0.1:7055 OpenQA.Selenium.WebDriverExceptionwas unhandled by user code   HResult=-2146233088   Message=Failed tostart up socket within 45000 ms. Attempted to connect to the followingaddresses: 127.0.0.1:7055   Source=WebDriver   StackTrace:       at OpenQA.Selenium.Firefox.FirefoxDriverServer.ConnectToBrowser(TimeSpantimeToWait)       at OpenQA.Selenium.Firefox.FirefoxDriverServer.Start()       at OpenQA.Selenium.Firefox.FirefoxDriverCommandExecutor.Execute(CommandcommandToExecute)       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)       at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilitiesdesiredCapabilities)       at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutorcommandExecutor, ICapabilities desiredCapabilities)       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile, ICapabilities capabilities, TimeSpancommandTimeout)       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile, TimeSpan commandTimeout)       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile)       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor()       at SMT.Web.FunctionalTests.Drivers.Driver.GetWebDriver(Int32 browser, String page)

我期望能够正常运行测试。

有没有人遇到过同样的事情?您是如何解决该问题的?

selenium版本:2.41.0(作为Nuget软件包安装)操作系统:Windows 7浏览器:Firefox浏览器版本:32

答案1

小编典典

Selenium2.41.0正式支持的最新Firefox版本是
28 。降级您的浏览器。根据其他答案,降级到Firefox 31足以使其正常运行。

最好安装最新的硒包。但是,该策略始终相同-确保您使用的是硒包浏览器支持的版本。

Firefox 与 geckodriver 版本兼容问题

Firefox 与 geckodriver 版本兼容问题

打开 python shell,执行以下脚本:

from selenium import webdriver
driver = webdriver.Firefox()
driver.maximize_window()
driver.get("http://baidu.com")

当脚本执行到 driver = webdriver.Firefox() 这一句时,页面卡住了,即 firefox 浏览器被成功打开,但没有像预期的一样被最大化,并且访问百度。网上查了好久,终于找到答案并解决问题。

这是一个兼容性问题,因 firefox 版本与 geckodriver 版本匹配导致,我的 firefox 版本是 56,但用的 geckodriver 版本是 25,显然 geckodriver 版本太高了,将 geckodriver 换成 20 后,

重新执行刚才的脚本,问题解决。geckodriver 下载地址:https://github.com/mozilla/geckodriver/releases

 

   附:Firefox 与 geckodriver 版本映射表

备注:在此感谢 https://blog.csdn.net/yinshuilan/article/details/90713084 ,提供的 Firefox 与 geckodriver 版本映射表,让我不用为版本匹配问题反复试错。

关于FirefoxDriver始终在“ firstrun”页面上启动,破坏所有测试脚本firefox already running的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于chromedriver、firefox-geckodriver、iedriver 下载链接、Firefox 57 更名 Firefox Quantum,速度是 Firefox 52 两倍、Firefox WebDriver不适用于Firefox 32、Firefox 与 geckodriver 版本兼容问题等相关内容,可以在本站寻找。

本文标签: