title: How to verify the new tab is opened or not in selenium cucumber js
body: <pre><code>var parent = driver.getWindowHandle(); 
  var windows = driver.getAllWindowHandles(); 
  driver.switchTo().window(windows[1]);     
  driver.close();                           
  driver.switchTo().window(parent);       
  driver.sleep(3000);
  const text=await driver.getCurrentUrl();  
  console.log(&quot;text&quot;+text) 
  </code></pre>
  <p>-I tried to fetch the newly opened tab URL but it is still pointing the Previous tab.Can anyone help me??Thanks in advance</p>