send/test/integration/pages/desktop/download_page.js

26 lines
547 B
JavaScript
Raw Normal View History

2018-10-04 00:39:39 +00:00
/* global browser */
const Page = require('./page');
2018-10-02 20:15:02 +00:00
2018-10-04 00:39:39 +00:00
class DownloadPage extends Page {
2018-10-31 18:31:17 +00:00
constructor(path) {
super(path);
this.downloadButton = '#download-btn';
this.downloadComplete = '#download-complete';
2018-10-02 20:15:02 +00:00
}
/**
* @function waitForPageToLoad
* @returns {Object} An object representing the page.
* @throws ElementNotFound
*/
waitForPageToLoad() {
2018-10-31 18:31:17 +00:00
browser.waitForExist(this.downloadButton);
2018-10-02 20:15:02 +00:00
return this;
}
2018-10-31 18:31:17 +00:00
download() {
return browser.click(this.downloadButton);
2018-10-02 20:15:02 +00:00
}
}
2018-10-04 00:39:39 +00:00
module.exports = DownloadPage;