public class HtmlFileDownloader extends Object
| Constructor and Description |
|---|
HtmlFileDownloader(AbstractHtmlDriver browserDriver) |
HtmlFileDownloader(org.openqa.selenium.WebDriver driverObject) |
| Modifier and Type | Method and Description |
|---|---|
String |
downloadFile(String downloadUrl)
Perform the file/image download.
|
String |
downloadFileFromLink(String pageUrl,
HtmlElement linkElement)
Download the file specified in the href attribute of a HtmlElement
|
String |
getDownloadDir() |
int |
getHTTPStatusOfLastDownloadAttempt()
Gets the HTTP status code of the last download file attempt
|
void |
mimicWebDriverCookieState(boolean value)
Mimic the cookie state of WebDriver (Defaults to true)
This will enable you to access files that are only available when logged in.
|
void |
setDownloadDir(String downloadDir) |
public HtmlFileDownloader(AbstractHtmlDriver browserDriver)
public HtmlFileDownloader(org.openqa.selenium.WebDriver driverObject)
public String getDownloadDir()
public void setDownloadDir(String downloadDir)
downloadDir - The download directory where the files will be downloaded to.public String downloadFileFromLink(String pageUrl, HtmlElement linkElement) throws Exception
linkElement - Exceptionpublic int getHTTPStatusOfLastDownloadAttempt()
public void mimicWebDriverCookieState(boolean value)
value - public String downloadFile(String downloadUrl) throws IOException
downloadUrl - IOExceptionFileTransferClientExceptionCopyright © 2017 Axway Software. All rights reserved.