selenium 2 chrome driver

后端 未结 10 588
情书的邮戳
情书的邮戳 2020-12-05 03:23

So I have read all the docs on adding chromedriver to my path and followed all of them. I am on a Mac with selenium2, maven, eclipse, and all the latest drivers:

<         


        
10条回答
  •  -上瘾入骨i
    2020-12-05 03:32

    Setting the webdriver.chrome.driver system property via maven can be done by the following (and tested working):

    1. Add systemPropertyVariables configuration to the maven-surefire-plugin in your pom.xml. This is (typically) because surefire is the caller for tests and where system properties will be set.

      
          maven-surefire-plugin
          2.7.1
          
              
                  ${webdriver.chrome}
              
          
      
      
    2. Now define ${webdriver.chrome} somewhere. A good start is a section in your pom.xml

      
          /home/gede/bin/chromedriver
      
      

    Potentially this could be done better via the use of like in Simon Martinelli's example

提交回复
热议问题