I am using Selenium in Python to create an automated test. In this test, I am trying to select a file from a local directory. I was able to find a reference using Java but I am struggling to convert this to Python. https://sqa.stackexchange.com/questions/12851/how-can-i-work-with-file-uploads-during-a-webdriver-test
element=driver.find_element_by_id("file_browse").click()
driver.file_detector("<>")
upload=driver.find_element_by_id("<>")
keys=upload.send_keys("<>")
For the file detector function I keep getting that the object is not callable. What should the input be for it?
Thanks!
driver.file_detector()to do? I'm not familiar with the api, but it appears to be a class instance that is not callable. Are you sure that what you want to do requires the use of a "file detector"? Take a look at this answer. stackoverflow.com/a/10472542/1977847