title: Wait time issue in JMeter Webdriver sampler
body: <p>I am using JMeter Webdriver sampler for the application UI response time measurement. I am facing issue with the wait function. For example the login page loads between 10 to 120 secs. So I have the following code for the login page in Webdriver sampler for the page load check.</p>
  
  <pre><code>var ui=JavaImporter(org.openqa.selenium.support.ui) 
  var wait=new support_ui.WebDriverWait(WDS.browser,120)
  wait.until(ui.ExpectedConditions.visibilityOfElementLocated(pkg.By.className('logout-btn-hover')))
  </code></pre>
  
  <p>The issue is even after the page load completely, JMeter is still waiting to perform the next action. This waiting time will reduce if I reduce the 120 secs.But sometimes the application will take 120 secs to load also so I need to keep 120 secs.</p>
  
  <p>I am writing the time to a log file once the sampler completes its action. Because of the wait time issue I am not able to calculate time properly. </p>