title: Selenium - Interact with exsting browser session using selenium-webdriver library in NodeJS
body: <p><a href="http://tarunlalwani.com/post/reusing-existing-browser-session-selenium/" rel="nofollow noreferrer">http://tarunlalwani.com/post/reusing-existing-browser-session-selenium/</a></p>
  
  <p>This post provides the insight for using existing session for selenium, but this is in Python/Java. Wanted to implement the same logic in NodeJS using selenium-webdriver library.</p>
  
  <p>I am able to access the session id using: </p>
  
  <pre><code>    driver.getSession().then( function(session) {
           console.log('Session:'+session.getId());
      });
  </code></pre>
  
  <p>But how to get the executor value?</p>
  
  <p>CHecked and found <code>webdriver.WebDriver.attachToSession</code> method will attach to the existing session, but need the value for executor and session for the same.</p>