简体   繁体   English

使用Selenium RC启动指定的浏览器后,测试无法运行

[英]After launching the specified browser with Selenium RC, The test doesn't run

PLEASE HELP, I'm out of Ideas!!!!!! 请帮助,我没主意了!!!!!! ,

I'm having a problem executing my Selenium IDE created tests using Selenium RC's -htmlSuite command on any of my browsers(ie, ff and chrome). 我在任何浏览器(即ff和chrome)上使用Selenium RC的-htmlSuite命令执行Selenium IDE创建的测试时遇到问题。

When I run the following command in CMD, Windows 8: 在Windows 8的CMD中运行以下命令时:

java -jar selenium-server-standalone-2.35.0.jar -htmlSuite "*googlechrome" " http://www.example.com " "C:\\Users\\Tunji\\Desktop\\SeleniumTestsCoreFunctionality\\BasicTest.html" "C:\\Users\\Tunji\\Desktop\\SeleniumTestsCoreFunctionality\\results.html" -firefoxProfileTemplate "C:\\Users\\Username\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\0srebkp2.selenium" java -jar selenium-server-standalone-2.35.0.jar -htmlSuite“ * googlechrome”“ http://www.example.com ”“ C:\\ Users \\ Tunji \\ Desktop \\ SeleniumTestsCoreFunctionality \\ BasicTest.html”“ C: \\ Users \\ Tunji \\ Desktop \\ SeleniumTestsCoreFunctionality \\ results.html“ -firefoxProfileTemplate” C:\\ Users \\ Username \\ AppData \\ Roaming \\ Mozilla \\ Firefox \\ Profiles \\ 0srebkp2.selenium“

The Browser successfully launches, BUT the selenese commands are Not being executed. 浏览器成功启动,但是执行selenese命令。

The Browser URL value when RC launches is: RC启动时的浏览器URL值为:

http://www.example.com/selenium-server/core/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=http%3A%2F%2Fwww.example.com&resultsUrl=../postResults&test=http%3A%2F%2Fwww.example.com%2Fselenium-server%2Ftests%2FBasicTest.html http://www.example.com/selenium-server/core/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=http%3A%2F%2Fwww.example.com&resultsUrl=../postResults&test=http%3A%2F %2Fwww.example.com%2Fselenium服务器%2Ftests%2FBasicTest.html

Any idea what the problem could be?...Please help. 知道可能是什么问题吗?...请提供帮助。

I'm using selenium-server-standalone-2.35.0.jar 我正在使用selenium-server-standalone-2.35.0.jar

Thanks! 谢谢!

The mistake I made was that my selenium test " BasicTest.html " wasn't a test suite. 我犯的错误是我的硒测试“ BasicTest.html ”不是测试套件。

Since it was a single test, the -html suite didn't recognize it. 由于是单个测试,因此-html套件无法识别它。 It only looks for a test suite to execute. 它仅查找要执行的测试套件。

I had to put the "BasicTest.html" into a " SeleniumTestSuite.html " and referenced that instead. 我不得不将“ BasicTest.html”放入“ SeleniumTestSuite.html ”中,并引用了它。

So the new command looked like this: 因此,新命令如下所示:

java -jar selenium-server-standalone-2.35.0.jar -htmlSuite "*googlechrome" " http://www.xxxx.com " "C:\\Users\\Tunji\\Desktop\\SeleniumTestsCoreFunctionality\\SeleniumTestSuite.html" "C:\\Users\\Tunji\\Desktop\\SeleniumTestsCoreFunctionality\\results.html" -firefoxProfileTemplate "C:\\Users\\Username\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\0srebkp2.selenium" java -jar selenium-server-standalone-2.35.0.jar -htmlSuite“ * googlechrome”“ http://www.xxxx.com ”“ C:\\ Users \\ Tunji \\ Desktop \\ SeleniumTestsCoreFunctionality \\ SeleniumTestSuite.html”“ C: \\ Users \\ Tunji \\ Desktop \\ SeleniumTestsCoreFunctionality \\ results.html“ -firefoxProfileTemplate” C:\\ Users \\ Username \\ AppData \\ Roaming \\ Mozilla \\ Firefox \\ Profiles \\ 0srebkp2.selenium“

After that It ran like it was supposed to :). 之后,它像应该的那样运行:)。 Hope that's clear enough. 希望这很清楚。

Tunji Tunji

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM