title: How to use javascript executor for webdriver sampler in Jmeter
body: <p>I need to use below javascript executor lines for webdriver sampler in Jmeter. </p>
  
  <p>WebElement el1 = driver.findElement(By.xpath("//div/button/span[contains( text(),'View Report')]"));
               JavascriptExecutor executor1 = (JavascriptExecutor)driver;
               executor1.executeScript("arguments[0].click()", el1);</p>
  
  <p>I tried to use below lines but getting below error message in logs
  var btnView = pkg.By.xpath("//div/button/span[contains( text(),'View Report')]");
  WDS.browser.executeScript("document.getElementByXpath(arguments[0]).click();", btnView )
  Error message:
  ERROR - com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler: Argument is of an illegal type: org.openqa.selenium.By$ByXPath</p>
  
  <p>Is there any way use javascript executor in Webdriver Sampler?</p>