I need to click on a button in a pop-up panel, select an option from its drop-down menu, read that option's text (just an asset ID), and then select a button to Generate a report. For some reason, I am able to access the panel's text area to input my custom file name, but cannot interact with the buttons. An image of the panel in question is linked below for reference.
The text area's XPATH:
/html/body/div[4]/div[2]/div/form/div/md-content/md-tabs/md-tabs-content-wrapper/md-tab-content[2]/div/md-content/div[2]/textarea
The code that will access the text area, clear the default name, and send the new file name:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/div[3]/div[2]/div/form/div/md-content/md-tabs/md-tabs-content-wrapper/md-tab-content[2]/div/md-content/div[2]/textarea'))).click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/div[3]/div[2]/div/form/div/md-content/md-tabs/md-tabs-content-wrapper/md-tab-content[2]/div/md-content/div[2]/textarea'))).clear()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/div[3]/div[2]/div/form/div/md-content/md-tabs/md-tabs-content-wrapper/md-tab-content[2]/div/md-content/div[2]/textarea'))).send_keys(file_name)
The "Generate" button's XPATH:
/html/body/div[4]/div[2]/div/form/div/md-content/md-tabs/md-tabs-content-wrapper/md-tab-content[2]/div/md-content/div[1]/md-menu-bar/md-menu/button
The code unable to click the "Generate" button:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/div[4]/div[2]/div/div/button[1]'))).click()
The pop-up panel's XPATH:
/html/body/div[4]/div[2]
Any and all help is appreciated, thank you!