Package com.codeborne.selenide.proxy
Class FileDownloadFilter
- java.lang.Object
-
- com.codeborne.selenide.proxy.FileDownloadFilter
-
- All Implemented Interfaces:
com.browserup.bup.filters.ResponseFilter
public class FileDownloadFilter extends java.lang.Object implements com.browserup.bup.filters.ResponseFilter
-
-
Constructor Summary
Constructors Constructor Description FileDownloadFilter(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Activate this filter.voiddeactivate()Deactivate this filter.java.lang.StringdownloadedFilesAsString()voidfilterResponse(io.netty.handler.codec.http.HttpResponse response, com.browserup.bup.util.HttpMessageContents contents, com.browserup.bup.util.HttpMessageInfo messageInfo)java.util.List<DownloadedFile>getDownloadedFiles()voidreset()java.lang.StringresponsesAsString()
-
-
-
Constructor Detail
-
FileDownloadFilter
public FileDownloadFilter(Config config)
-
-
Method Detail
-
activate
public void activate()
Activate this filter. Starting from this moment, it will record all responses that seem to be a "file download".
-
reset
public void reset()
-
deactivate
public void deactivate()
Deactivate this filter. Starting from this moment, it will not record any responses.
-
filterResponse
public void filterResponse(io.netty.handler.codec.http.HttpResponse response, com.browserup.bup.util.HttpMessageContents contents, com.browserup.bup.util.HttpMessageInfo messageInfo)- Specified by:
filterResponsein interfacecom.browserup.bup.filters.ResponseFilter
-
getDownloadedFiles
public java.util.List<DownloadedFile> getDownloadedFiles()
- Returns:
- list of all downloaded files since activation.
-
responsesAsString
public java.lang.String responsesAsString()
- Returns:
- all intercepted http response (as a string) - it can be useful for debugging
-
downloadedFilesAsString
public java.lang.String downloadedFilesAsString()
- Returns:
- all downloaded files (as a string) - it can be useful for debugging
-
-