Just like the title says, I am having trouble with getting my code to focus on a new window, using the "driver.switch_to_window".
My task is to: Click button on the parent page > new window appears > click an "accept" button on the new window and continue with the rest of the code
driver.get("https:testpage.com/")
driver.find_element_by_xpath("/html/body/div[1]/div[1]/main/div/div/div/div[2]/ul/li[1]/button").click()
#here the window appears
time.sleep(2)
driver.switch_to_window("windowName")
driver.find_element_by_xpath("/html/body/div[1]/div/div[2]/div/div[3]/button[2]").click() #here nothing happens