title: IE driver is not working with Selenium in JMeter using Internet explorer driver config
body: <p>I am using Web driver sampler with Javascript as a scripting language for real-time browser simulation. In case of Chrome, everything is working fine. But, in case of IE, internet explorer driver config is not working properly. IE Browser alone gets launched and other operations are not getting triggered. Below is the log that I receive.</p>
  
  <pre><code>2018-04-04 11:47:38,176 INFO o.a.j.e.StandardJMeterEngine: Running the test!
  2018-04-04 11:47:38,179 INFO o.a.j.s.SampleEvent: List of sample_variables: []
  2018-04-04 11:47:38,187 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
  2018-04-04 11:47:38,248 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
  2018-04-04 11:47:38,249 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
  2018-04-04 11:47:38,250 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
  2018-04-04 11:47:38,250 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
  2018-04-04 11:47:38,254 INFO o.a.j.t.ThreadGroup: Started thread group number 1
  2018-04-04 11:47:38,255 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
  2018-04-04 11:47:38,272 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
  2018-04-04 11:47:53,219 ERROR o.a.j.t.JMeterThread: Error calling threadStarted
  org.openqa.selenium.WebDriverException: session null does not exist (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 8 milliseconds
  Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43'
  System info: host: 'ERD-L144', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
  Driver info: org.openqa.selenium.ie.InternetExplorerDriver
  Capabilities [{capabilities={proxy={proxyType=system}, acceptInsecureCerts=false, browserVersion=11, se:ieOptions={browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.usePerProcessProxy=false, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, nativeEvents=true, ie.ensureCleanSession=true, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, initialBrowserUrl=http://localhost:41813/, ignoreProtectedModeSettings=false}, timeouts={implicit=0, pageLoad=300000, script=30000}, browserName=internet explorer, pageLoadStrategy=normal, unhandledPromptBehavior=dismiss, platformName=windows, setWindowRect=true}, sessionId=515c1f34-cdf2-4abb-a141-1bd0c7c3f278, platform=ANY}]
  Session ID: null
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_151]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_151]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_151]
      at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_151]
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) ~[selenium-remote-driver-2.52.0.jar:?]
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) ~[selenium-remote-driver-2.52.0.jar:?]
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) ~[selenium-remote-driver-2.52.0.jar:?]
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701) ~[selenium-remote-driver-2.52.0.jar:?]
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:948) ~[selenium-remote-driver-2.52.0.jar:?]
      at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.getPreparedBrowser(WebDriverConfig.java:235) ~[jmeter-plugins-webdriver-2.3.jar:?]
      at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:220) ~[jmeter-plugins-webdriver-2.3.jar:?]
      at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:676) [ApacheJMeter_core.jar:4.0 r1823414]
      at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994) [jorphan.jar:4.0 r1823414]
      at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) [jorphan.jar:4.0 r1823414]
      at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:644) [ApacheJMeter_core.jar:4.0 r1823414]
      at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:632) [ApacheJMeter_core.jar:4.0 r1823414]
      at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:246) [ApacheJMeter_core.jar:4.0 r1823414]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]
  2018-04-04 11:47:53,223 INFO o.a.j.s.FileServer: Stored: D:\Bala\Performance\CoE\CSVs\users.csv
  2018-04-04 11:47:53,224 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'Login Page'.
  java.lang.IllegalArgumentException: Browser has not been configured.  Please ensure at least 1 WebDriverConfig is created for a ThreadGroup.
      at com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler.sample(WebDriverSampler.java:62) ~[jmeter-plugins-webdriver-2.3.jar:?]
      at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490) ~[ApacheJMeter_core.jar:4.0 r1823414]
      at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416) [ApacheJMeter_core.jar:4.0 r1823414]
      at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250) [ApacheJMeter_core.jar:4.0 r1823414]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]
  2018-04-04 11:47:53,225 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
  2018-04-04 11:47:53,226 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
  2018-04-04 11:47:53,226 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
  2018-04-04 11:47:53,226 INFO o.a.j.s.FileServer: Close: D:\Bala\Performance\CoE\CSVs\users.csv
  2018-04-04 11:47:53,228 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
  </code></pre>
  
  <p>Sampler code is:</p>
  
  <pre><code>var pkg = JavaImporter(org.openqa.selenium, org.openqa.selenium.support.ui, org.openqa.selenium.ie.InternetExplorerDriver)
  var wait = new pkg.WebDriverWait(WDS.browser, 60)
  var username = WDS.args[0]
  var password = WDS.args[1]
  WDS.log.info('username :' + username)
  WDS.log.info('password :' + password)
  //WDS.browser.manage().window().maximize()
  java.lang.Thread.sleep(1000);
  WDS.browser.get("http://gmail.com")
  WDS.sampleResult.sampleStart()
  WDS.sampleResult.setSampleLabel("Login Page")
  
  while(true) {
      var currentState = WDS.browser.executeScript("return document.readyState;").toString().equals("complete")
      if(currentState) {
          WDS.log.info('Login Page - Document loaded...')
          break
      } else {
          WDS.log.info('Login Page - Document is still loading...')
      }
  }
  
  while(true) {
      var activeRequest = WDS.browser.executeScript("return window.$.active;").toString().equals("0")
      if(activeRequest) {
          WDS.log.info('Login Page - Loaded all request...')
          break
      } else {
          WDS.log.info('Login Page - Still loading request...')
      }
  }
  
  wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.id('loginDiv')))
  WDS.browser.findElement(pkg.By.id('username')).sendKeys([username])
  WDS.browser.findElement(pkg.By.id('password')).sendKeys([password])
  WDS.sampleResult.sampleEnd()
  java.lang.Thread.sleep(10000);
  </code></pre>
  
  <p>Below are the things I tried so far:</p>
  
  <ol>
  <li><p>Set security mode same in all levels - Enabled protected mode and
  Security is set to High in all levels.</p></li>
  <li><p>Set security mode - Disabled protected mode in all the levels</p></li>
  <li><p>Created DWORD in registry for 64 bit driver - not launching the
  browser itself.</p></li>
  <li><p>Tried with 32 bit driver - only browser is launched and then
  exception is thrown.</p></li>
  </ol>
  
  <p>Kindly suggest me the solution to solve this.</p>