What I’m doing is this (make sure drv is an instance of webdriver):
drv.find_element_by_id("IdOfInputTypeFile").send_keys(os.getcwd()+"/image.png")
and then find your submit button and click it.
More Related Contents:
- Python Selenium wait for several elements to load
- Check if any alert exists using selenium with python
- Select -> option abstraction
- Expected conditions in protractor
- Switch to an iframe through Selenium and python
- Python + Selenium: Wait until element is fully loaded
- How to get text with Selenium WebDriver in Python
- How to pass arguments in pytest by command line
- Unable to use Selenium to automate Chase site login
- Checking if element exists with Python Selenium
- Selenium Element not visible exception
- Using MultipartPostHandler to POST form-data with Python
- How to disable CSS in Python selenium using ChromeOptions
- Selenium Unable to locate element only when using headless chrome (Python)
- Error when loading cookies into a Python request session
- Dynamic dropdown doesn’t populate with auto suggestions on https://www.nseindia.com/ when values are passed using Selenium and Python
- ElementNotVisibleException : Selenium Python
- ElementNotInteractableException: Message: element not interactable error while sending text to Email field on Quora using Selenium with Python
- SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 84 using ChromeDriver and Chrome through Selenium and Python
- selenium grid listening on node port instead of hub port
- crawl site that has infinite scrolling using python
- PhantomJS with Selenium error: Message: ‘phantomjs’ executable needs to be in PATH
- Handle notifications in Python + Selenium Chrome WebDriver
- How to get background-image from inline css using selenium
- How to rotate various user agents using selenium python on each request
- Practicing BDD with python [closed]
- Automation Google login with python and selenium shows “”This browser or app may be not secure””
- Scraping Data from a website which uses Power BI – retrieving data from Power BI on a website
- Slow scrolling down the page using Selenium
- Capture AJAX response with selenium and python