uploading photos to Craigslist with Python and Selenium
You should not operate with <button>
element, but with <input>
instead, so use following code:
browser.find_element_by_xpath("//input[@type='file']").send_keys(filepath)
You should not operate with <button>
element, but with <input>
instead, so use following code:
browser.find_element_by_xpath("//input[@type='file']").send_keys(filepath)