code: @Given("^a new window is opened$")
      public void seleniumGetwindows() {
          Set<String> wel = commonspec.getDriver().getWindowHandles();
  
          Assertions.assertThat(wel).as("Element count doesnt match").hasSize(2);
      }
docs: Get all opened windows and store it.