How to know if a download of a file has occurred with Selenium webdriver in python

0

I'm doing a test that downloads a file. This already occurs, but my question is that if there is any way to verify that the download has been successful.

Greetings

    
asked by Thenine 26.11.2018 в 16:21
source

1 answer

0

With basic Python commands you can check the contents of a directory. For example:

contenido = os.listdir("mi_path")
"nombre_archivo_descargado" in contenido

The last line returns a boolean and you can use an Asset to ensure automatic operation.

    
answered by 27.11.2018 в 08:58