我正在尝试在 GOOGLE CHROME 中运行 FIREFOX selenium IDE 生成的文件。
下面是对问题所在以及我已尝试(到目前为止未成功)解决该问题的逐步描述。
环境
Selenium IDE – installed**strong text**
Selenium RC – installed
Java version 1.7.0.05 - installed
我想做的事情:
在 GOOGLE CHROME 中运行 FIREFOX IDE 生成的测试 步骤
(1) Following three .htm files created using FIREFOX
a. google_for_selenium_rc.htm
b. google_for_testing.htm
c. visit_google_videos
(2) Created suite.htm file (see attached)
(3) Run the following command in cmd:
java –jar selenium-server.jar –htmlSuite “C:\Program Files
(x86)\Google\Chrome\Application\chrome.exe¬” “http://www.google.com.au”
“C:\Users\shelleymoudgil\Documents\KB\Selenium\SeleniumIDE\suite.htm”
“C:\Users\shelleymoudgil\Documents\KB\Selenium\SeleniumIDE\results.htm”
预期
(4) Script successfully executed in GOOGLE CROME
实际
(5) Following Error displayed:
错误:
Could not find or load main class ûjar
到目前为止尝试过的解决方案
- 已将 C:\Program Files\Java\jre7\bin\添加到 PATH
- 已将 C:\Program Files (x86)\Java\jre7\bin 添加到 PATH
- 已将 C:\Program Files (x86)\Google\Chrome\Application\添加到路径
我是java和selenium的新手。我过去 1 天被困住了。有人可以指导并建议可能的解决方案或我可能做错了什么吗?
谢谢 美国
最佳答案
仅从错误消息来看,您的 -jar
参数的第一个字符不是 -
,可能是破折号。然后它会将 –jar
解释为要在类路径上搜索的类。尝试这样做会对我产生相同的错误消息,以系统上的错误消息发生的任何编码转换为模。
关于java - Selenium RC - 错误 : Could not find or load main class jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14532303/