How to run selenium scripts written in java from jmeter?

后端 未结 3 1622
粉色の甜心
粉色の甜心 2021-01-28 09:16

I am trying to use my Selenium scripts in java with JMeter\'s WebDriver Sampler.

Inside the webdriver sampler, the language is seleced to java, and the following code

3条回答
  •  执念已碎
    2021-01-28 10:03

    If you are using Chrome driver 2.28 with Selenium 3.x.x you have to set the path of the Chrome driver before you open the browser.

    Add this line: System.setProperty("webdriver.chrome.driver", "C:\\your_folder\\chrome.exe");

    Next, WebDriver driver;

    Let me know if this helps you.

提交回复
热议问题