Class DownloadDetector

java.lang.Object
com.codeborne.selenide.impl.DownloadDetector
All Implemented Interfaces:
Serializable, Comparator<DownloadedFile>

public class DownloadDetector extends Object implements Comparator<DownloadedFile>, Serializable
Sort all downloaded files by "likeness" to be the right download.

1. Response with "Content-Disposition" is most likely the right download. 2. Response with type "text/html", "text/plain", "text/css", "text/javascript", "application/json" are less likely the right download. 3. Latest file wins 4. The first file (alphabetically) wins

See Also: