 <p>You can try something like this:</p> <pre><code>/** * @When /^The document should open in a new tab$/ */ public function documentShouldOpenInNewTab() { $session = $this-&gt;getSession(); $windowNames = $session-&gt;getWindowNames(); if(sizeof($windowNames) &lt; 2){ throw new \ErrorException("Expected to see at least 2 windows opened"); } //You can even switch to that window $session-&gt;switchToWindow($windowNames[1]); } </code></pre> <p><em>NOTE:</em> Probably windows can open with some delay and in that case you need to wait for it:</p> <pre><code> $ttw = 40; while ((sizeof($session-&gt;getWindowNames()) &lt; 2 &amp;&amp; $ttw &gt; 0) == true) { $session-&gt;wait(1000); $ttw--; } </code></pre>