The function opens the site and clicks on the download exe file button. But I get a window with the Keep and Discard buttons. How can I process them?
def buttonTSDownload(self):
browser = webdriver.Chrome()
browser.get('https://www.teamspeak.com/en/downloads/')
xpath = '/html/body/div[1]/div/div/div/div/div/div[1]/div/div[1]/div[1]/div[2]/div[2]/div/a'
browser.find_element(By.XPATH, xpath).click()
file_path = f"C:/Users/{self.nameUsers}/Downloads/TeamSpeak3-Client-win64-3.5.6.exe"
while not os.path.isfile(file_path):
time.sleep(1)
browser.quit()