title: Webdriverio: access to window object
body: <p>I'm trying Webdriverio Testrunner with Selenium Standalone. One test I would like to do should check a global variable (window.myVar) but when I try to return the window object I receive something weird</p>
  
  <pre><code>it('should return window', (done) =&gt; {
  
  const url = 'http://www.example.com';
  
  browser.url(url);
  browser.waitForVisible('body', 20000);
  browser.pause(1000);
  browser.execute(getWindow)
      .then(result =&gt; {
          console.log(result);
      });
  </code></pre>
  
  <p>});</p>
  
  <p>This print:</p>
  
  <pre><code>․{ sessionId: '6f0cd910-2ec8-11e8-80fb-bf4604ec860e',
    status: 0,
    value: { WINDOW: ':wdc:1521829902692' } }
  </code></pre>
  
  <p>What is WINDOW: ':wdc:1521829902692'? How can I get the actual window object?</p>