我们让Jenkins在一台centOS虚拟机上运行headless,并在另一台计算机上通过http调用访问它。
我有一个运行UI Selenium测试的项目,除了firefox之外,所有的都运行得很好。它抱怨配置文件不在centOS vm上,因此可以将其转发到windows VM进行测试。有谁知道如何在centOS上获得最新和最好的火狐,因为百胜只有17个(无头CentOS VM)?另外,如果我只想在该虚拟机上scp当前的火狐配置文件,那么火狐配置文件存储在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机器运行时,它工作得很好,因为驱动程序在那个位置,可以转发到测试vm。
发布于 2013-09-13 05:12:39
使火狐配置文件可供Windows在运行Selnium节点的Windows上使用的一种方法是在CentOS上创建一个指向火狐配置文件的共享,然后将该共享挂载到CentOS上。下面是我用来实现这一点的步骤:
FirefoxProfile profile = new FirefoxProfile(new File("/mnt/windowsShareName")); DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability(FirefoxDriver.PROFILE, profile);
在Selenium驱动程序为instantiated.之后,Windows配置文件将来自CentOS共享并转发到Windows节点
发布于 2013-08-14 18:31:39
火狐1.尝试安装更新版本的
为了做到这一点,你可以使用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.rpm2.尝试复制现有配置文件并将其显式指定为
https://stackoverflow.com/questions/17198837
复制相似问题