After I switch to a new window and complete the task, I want to close that new window and switch to the old window,
so here i written like code:
// P
To close a single browser window:
driver.close();
To close all (parent+child) browser windows and end the whole session:
driver.quit();