diff --git a/src/main/java/com/sdl/selenium/utils/config/WebDriverConfig.java b/src/main/java/com/sdl/selenium/utils/config/WebDriverConfig.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/sdl/selenium/utils/config/WebDriverConfig.java
+++ b/src/main/java/com/sdl/selenium/utils/config/WebDriverConfig.java
@@ -220,7 +220,13 @@ public class WebDriverConfig {
      * @return oldTabName

      */

     public static String switchToLastTab() {

-        int totalTabs = driver.getWindowHandles().size();

+        int totalTabs;

+        int time = 0;

+        do {

+            totalTabs = driver.getWindowHandles().size();

+            LOGGER.info("totalTabs is {}", totalTabs);

+            time++;

+        } while (totalTabs < 1 && time < 10);

         return switchToTab(totalTabs - 1);

     }
improvement switchToLastTab