TestNG:线程“main"中的异常com.beust.jcommander.ParameterException:未知选项:-protocol [英] TestNG:Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -protocol

查看:44
本文介绍了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)

实际 selenium 类中没有错误.

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆