简体   繁体   中英

Using JMETER: “jp@gc - WebDriver Sampler” for Chrome Driver with Response Code 500

I am currently using the JMeter WebDriver Sampler for Chrome. I have tried with 89, 88 & 87 ChromeDriver.exe but it doesn't work properly. The Chrome browser launched and it's not displaying the Google website. Please advise and attached is my config and codes. Thanks.

在此处输入图像描述

在此处输入图像描述

This is mainly because of syntax errors in your script:

  1. You should not have whitespaces between class and function names

    WDS.sampleResult.sampleStart() WDS.browser.get('http://google.com') WDS.sampleResult.sampleEnd()
  2. I don't think you can use Beanshell with WebDriver Sampler, consider switching to JavaScript (which is default) or Groovy (which is recommended scripting option since JMeter 3.1 ) or at least if you want/have to you need to have semicolons in the end of lines and change quotation marks to " these.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM