I have a working test case that uploads a file, but I am getting a warning about closing the file.
I can't find a way of closing the file, since I am not the one opening it.
The portion of the test that handles the file:
file = "/tmp/CoolPDF.pdf"
upload_document = self.driver.find_element(By.ID,"file-upload")
upload_document.clear()
upload_document.send_keys(file)
ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 50145), raddr=('127.0.0.1', 50141)> return self.run(*args, **kwds) ResourceWarning: Enable tracemalloc to get the object allocation traceback