无法启动Internet Explorer,而是尝试寻找Opera启动器

时间:2019-05-28 06:00:17

标签: selenium

当我尝试启动Internet Explorer 11时,它尝试查找Opera启动器并抛出异常 “发生了异常:

org.openqa.selenium.WebDriverException: Could not initialize class com.opera.core.systems.runner.launcher.OperaLauncherRunner
Command duration or timeout: 109 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.7.0_79'"

My hub file is as below:
C:
java -jar C:\Users\Public\Selenium-batch\selenium-server-standalone-2.42.2.jar -role hub -host "10.79.104.5" -port 4444
 and Node is as below:
C:
java -Dwebdriver.ie.driver=C:\Users\Public\Selenium-batch\IEDriverServer.exe  -jar C:\Users\Public\Selenium-batch\selenium-server-standalone-2.42.2.jar -role node -host "10.79.104.5" -hub http://10.79.104.5:4444/grid/register -port 5566 -browser browserName=iexplorer,platform=WINDOWS,maxInstances=1 -browser browserName=firefox,platform=WINDOWS,maxInstances=1 -browser browserName=chrome,platform=WINDOWS,maxInstances=1 -maxSessions=3 

以前使用过JAVA 1.7,并且错误地安装了JRE1.8,当我卸载JRE8并重新启动系统时,出现此错误。

TestCase ID:174602 and Browser Name is:IE and  Iteration Id: 1
Exception Occured: org.openqa.selenium.WebDriverException: Could not initialize class com.opera.core.systems.runner.launcher.OperaLauncherRunner
Command duration or timeout: 109 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.7.0_79'
Driver info: org.openqa.selenium.remote.RemoteWebDriver

1 个答案:

答案 0 :(得分:0)

问题解决了。当我在集线器和节点批处理文件中添加-Dos.name = windows时,它现在运行良好。