I want to write a script that uploads a file to the server. Using IDE version it uploads the file, but when I export test case as python 2, unit test or WebDriver it is not able to upload. There is no error but it is not uploading the file on the server.
Below is my Python Code:
driver.find_element_by_id("start-upload").click()
driver.find_element_by_css_selector("input[type=\"file\"]").clear()
driver.find_element_by_css_selector("input[type=\"file\"]").send_keys("C:\\\\Desktop\\\\demo.jpeg")
Please provide me a Solution.