I am trying to make an instagram bot to upload images / make posts. But when I try to select the upload button on the pop-up window using selenium it doesn't recognize the element.
I've tried to change windowHandles and that doesn't work. I've tried referencing it as an alert and that also won't work. I'm selecting the item using the xpath and usually selenium will instead interact with an item on the underlying page instead of the open pop-up window
chooseFileButton = ig.driver.find_element(by=By.XPATH, value="//button[contains(text(), 'Select from computer')]")
chooseFileButton.send_keys("data/images/img7.png")
I attached an image to show what I mean.