Using Chrome Driver with Selenium 2

前端 未结 7 1298
情深已故
情深已故 2020-12-28 16:30

I\'m trying to use Chrome Drive to execute some of my tests, which are working perfectly with Firefox, but I\'m not being able to execute them, I\'m already verified the req

7条回答
  •  时光说笑
    2020-12-28 17:17

    If you are using Maven Project. Follow the below steps

    1. Download the latest chromedriver.exe from this link.
    2. Create a drivers folder in test. It should look like this src/test/resources/drivers
    3. Move the chromedriver.exe to the above path in step 2
    4. Use the below code for before creating chrome driver object

    System.setProperty("webdriver.chrome.driver", Thread.currentThread().getContextClassLoader().getResource("drivers/chromedriver.exe").getFile());

提交回复
热议问题