Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 无法通过chrome上的selenium RC运行测试_Google Chrome_Selenium_Selenium Rc - Fatal编程技术网

Google chrome 无法通过chrome上的selenium RC运行测试

Google chrome 无法通过chrome上的selenium RC运行测试,google-chrome,selenium,selenium-rc,Google Chrome,Selenium,Selenium Rc,我通过selenium RC运行了一个测试,它运行得很好。我使用以下命令行: java-jar selenium-server-standalone-2.32.0.jar-firefoxProfileTemplate“SeleniumProfile”-htmlsuite“*firefox”“testSuite1.html”“result.html” 我尝试在chrome上运行相同的命令,将“*firefox”替换为“*googlechrome”,但失败了: Chrome已打开,但显示以下消息:“

我通过selenium RC运行了一个测试,它运行得很好。我使用以下命令行:

java-jar selenium-server-standalone-2.32.0.jar-firefoxProfileTemplate“SeleniumProfile”-htmlsuite“*firefox”“testSuite1.html”“result.html”

我尝试在chrome上运行相同的命令,将“*firefox”替换为“*googlechrome”,但失败了:

Chrome已打开,但显示以下消息:“您正在使用不受支持的命令行标志:-禁用web安全。稳定性和安全性将受到影响”

通过在命令行中删除-firefoxProfileTemplate“SeleniumProfile”,我得到了相同的结果

你知道我需要修改什么才能让它工作吗? 提前谢谢你,
托马斯。

我想你必须指向Chrome驱动程序,所以添加以下内容:

-Dwebdriver.chrome.driver=C:\grid2\chromedriver.exe
在此处下载驱动程序: 并根据需要修改路径

当然,您必须删除Firefox配置文件引用


希望有帮助。

您可以添加以下两行内容,这两行内容将修复此错误:-

System.setProperty(“webdriver.chrome.driver”,“C:\Users\Administrator\Documents\selenium\chromedriver\u win32\chromedriver.exe”)

WebDriver驱动程序=新的ChromeDriver()

很抱歉,我没有看到答案,我会尽快尝试。感谢汉克斯的建议——尝试过——没有什么不同。我需要告诉PHPUnit做些不同的事情吗?