I have a method where I need to switch to child window to continue the the execution and I dont need the parent window anymore. So, how I can close the parent window and continue my execution on child window only?
public ServicesPage clickOnBookAppointmentLink() {
getAction().click(SalonServicesLocators.BOOK_Service_LINK);
HashMap<String, String> childWindowhandle = new HashMap<>();
getWaits().waitForWindowToBeVisible(2, 60);
childWindowhandle = getAction().getWindowHandles();
getAction().switchToWindow(childWindowhandle, "CHILD");
getAction().goToURL(Cont.MyURL_URL); // to navigate to the services booking page URL
return this;
}