gpt4 book ai didi

firefox - centOS、Jenkins、Firefox 和 Selenium GRID -- UnableToCreateProfileException

转载 作者:太空宇宙 更新时间:2023-11-03 17:13:10 25 4
gpt4 key购买 nike

我们让 Jenkins 在 centOS 虚拟机上 headless 运行,并通过另一台计算机上的 http 调用访问它。

我有一个用于运行 UI Selenium 测试的项目,除了 firefox 之外,所有项目都运行良好。它提示配置文件不在 centOS 虚拟机上,因此它可以将其转发到 Windows 虚拟机进行测试。有谁知道如何在 centOS 上获得最新最好的 firefox,因为 yum 只有 17 个( headless CentOS VM)?另外,如果我只想在该 VM 上 scp 当前的 firefox 配置文件,则 firefox 配置文件存储在 CentOS 操作系统上的哪里?我没有想到的任何其他解决方案?让我知道是否需要更多信息,jenkins 错误如下:

org.openqa.selenium.firefox.UnableToCreateProfileException: Given model profile directory does not exist: C:\Users\Selenium\FirefoxDriver
Build info: version: '2.31.0', revision: '1bd294d', time: '2013-02-27 20:52:59'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-358.6.1.el6.x86_64', java.version: '1.7.0'
Driver info: driver.version: unknown
org.openqa.selenium.firefox.FirefoxProfile.verifyModel(FirefoxProfile.java:154)
org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:92)
org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:79)
com.igt.sqes.automation.selenium.factories.WebDriverFactory.createWebDriver(Unknown Source)
com.igt.sqes.automation.arcus.setup.ArcusTestSuiteSetup.setUp(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
org.testng.SuiteRunner.privateRun(SuiteRunner.java:277)
org.testng.SuiteRunner.run(SuiteRunner.java:240)
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
org.testng.TestNG.runSuitesSequentially(TestNG.java:1194)
org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
org.testng.TestNG.run(TestNG.java:1031)
org.testng.TestNG.privateMain(TestNG.java:1338)
org.testng.TestNG.main(TestNG.java:1307)

从 Windows 框运行时它工作正常,因为驱动程序位于该位置并且可以转发到测试虚拟机。

最佳答案

<强>1。尝试安装更新版本的 Firefox

为此,您可以使用 Remi 存储库

## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Step by step instruction

<强>2。尝试复制现有配置文件并明确指定它

请参阅以下主题:CentOS Selenium - Preparing firefox profile

关于firefox - centOS、Jenkins、Firefox 和 Selenium GRID -- UnableToCreateProfileException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17198837/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com