I would like to open a new tab in selenium. Additionally, I would like to click on a button that appeared in the new tab.
driver.execute_script("window.open('')")
driver.switch_to_window(driver.window_handles[1])
driver.find_element_by_xpath()
This my code. The problem is that with "driver.find_element_by_xpath()" I can only click on elements that are on the main window.