Selenium clicks on a link and opens a new window. But at the same time it sometimes closes the initial window though I need it to be open. Looks like it does so when it fails to receive session_id_cookie from the server. Any ideas how I could bypass the problem. Either wait for the cookie to come or may be there is a special method to keep the initial window open.
target=item.find_element(By.XPATH, "a")actions = ActionChains(driver)actions.move_to_element(target).perform()target.click()