TestNG:Exception in thread “main” com.beust.jcommander.ParameterException: Unknown option: -protocol

馋奶兔 提交于 2020-02-08 03:25:31

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/40282103/testngexception-in-thread-main-com-beust-jcommander-parameterexception-unkno

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!