How to access hidden file upload field with Selenium WebDriver python

Solved with this:

driver.execute_script("document.getElementById('uploadImage'‌​).style.visibility='‌​visible'")

Execute JavaScript to make the input element visible before interacting with it.

driver.execute_script("""document.querySelector("div.yourClassNameHere input[type=file]").style.display='block'""")

# Send the absolute file path of the file to the input element
input = browser.find_element(:xpath, "//input[@type='file']")
input.sendKeys(os.path.abspath("image.jpg"))

Make sure you replace the queries with ones that make sense for you.