I'm trying to upload file using python selenium on a website whose file field in html looks like this:
<div id="fallback" style="display: none;">
<input id="upload-input" type="file" name="file" multiple="multiple">
<div id="upload-progress" class="upload-progress"></div>
</div>
I'm trying to make element visible via following code:
elem = driver.find_element_by_xpath("//input[@id='upload-input']")
driver.execute_script("arguments[0].removeAttribute('style')", elem)
elem = driver.find_element_by_xpath("//input[@id='upload-input']")
After running the script, script stops without uploading the file and without throwing any error.
After using elem.is_displayed(), I've found the element is still not displayed even after running the above block of code.