title: Codeception WebDriver executeInSelenium issue (wrong instance given)
body: <p>I'm trying to switch to a new opened window in codeception using WebDriver.
  I used the code from manual so:</p>
  
  <pre><code>    $I-&gt;executeInSelenium(function (\Webdriver\Session $webdriver) {
          $handles=$webdriver-&gt;window_handles();
          $last_window = end($handles);
          $webdriver-&gt;focusWindow($last_window);
      });
  </code></pre>
  
  <p>Unfortunately the webdriver for some reason is not instance of Webdriver\Session but RemoteDriver</p>
  
  <pre><code>  [ErrorException] Argument 1 passed to
    Codeception\Module\magicguyHelper::Codeception\Module\{closure}()
    must be an instance of WebDriver\Session, instance of RemoteWebDriver given,
    called in 
    phar:///tester/codecept.phar/src/Codeception/Module/WebDriver.php
    on line 1038 and defined 
  </code></pre>
  
  <p>Anyone understand why this issue appeared ?</p>