How to run selenium 3.x with chrome driver through terminal

后端 未结 1 1129
萌比男神i
萌比男神i 2021-01-18 21:49

May be it\'s easy question but I can\'t find any info about that.

I used to run selenium 2.x as that way. I start server:

java -jar selenium-server-s         


        
1条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 22:50

    your options are out of order. -D... is a java runtime variable. it needs to come before the -jar directive.

    Change your command to

    java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-2.53.1.jar -browserSideLog -debug -timeout 60
    

    I used to run selenium 2.x as that way.

    Yes, we changed the source to use JCommander in 3.0 to parse options passed into the jar. -D directives are now parsed as options you are trying to pass into the jar, just like -debug and -timeout. For your command to be well formed, you really should be using -D... before the -jar directive.

    0 讨论(0)
提交回复
热议问题