I have span
link to upload images. When i click this link it opens a Chrome Window to select a file. But Selenium can't do this automatically. How can I handle this window and choose a file?
choose_photo = driver.find_element_by_id("form-2033-innerCt")
choose_photo.click()
choose_photo.send_keys("C:\\Users\\Support\\AppData\\Roaming\\Skype\\My Skype Received Files\\1.png")
And this is the HTML element to click
<span id="fileuploadfield-2034-button-btnInnerEl" data-ref="btnInnerEl" unselectable="on" class="x-btn-inner x-btn-inner-default-small">Choose photo</span>
Screenshot:
Note that the HTM
L element is not type = file
, as you can see.