Package com.codeborne.selenide.impl
Class DownloadDetector
- java.lang.Object
-
- com.codeborne.selenide.impl.DownloadDetector
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Comparator<DownloadedFile>
public class DownloadDetector extends java.lang.Object implements java.util.Comparator<DownloadedFile>, java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DownloadDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(DownloadedFile file1, DownloadedFile file2)
-
-
-
Method Detail
-
compare
public int compare(DownloadedFile file1, DownloadedFile file2)
- Specified by:
comparein interfacejava.util.Comparator<DownloadedFile>
-
-