send/test/integration/pages/desktop/download_page.js
2018-11-01 10:44:47 -07:00

25 lines
547 B
JavaScript

/* global browser */
const Page = require('./page');
class DownloadPage extends Page {
constructor(path) {
super(path);
this.downloadButton = '#download-btn';
this.downloadComplete = '#download-complete';
}
/**
* @function waitForPageToLoad
* @returns {Object} An object representing the page.
* @throws ElementNotFound
*/
waitForPageToLoad() {
browser.waitForExist(this.downloadButton);
return this;
}
download() {
return browser.click(this.downloadButton);
}
}
module.exports = DownloadPage;