本文介绍了TestNG:线程"main"中的异常; com.beust.jcommander.ParameterException:未知选项:-protocol的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在运行testng.xml时,出现以下错误:
On running the testng.xml, I am getting the following error:
Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -protocol
at com.beust.jcommander.JCommander.parseValues(JCommander.java:742)
at com.beust.jcommander.JCommander.parse(JCommander.java:282)
at com.beust.jcommander.JCommander.parse(JCommander.java:265)
at com.beust.jcommander.JCommander.<init>(JCommander.java:210)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:161)
实际的硒类中没有错误.
No errors are there in the actual selenium classes.
推荐答案
问题已解决.该问题是由RemoteTestNG加载引起的.因此,我刚刚删除了C:/Program%20Files/Java/jdk1.8.0_40/jre/lib/ext/testng-6.9.6.jar.我能够运行testng.xml而没有任何错误消息.感谢@XuQing Tan的宝贵意见.
Issue is resolved now. The problem was occurred by the RemoteTestNG loading. So I just removed the C:/Program%20Files/Java/jdk1.8.0_40/jre/lib/ext/testng-6.9.6.jar. I am able to run the testng.xml without any error message. Thanks @XuQing Tan for your valuable comments.
这篇关于TestNG:线程"main"中的异常; com.beust.jcommander.ParameterException:未知选项:-protocol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!