24
1
Fork 0
drop.chapril.org-firefoxsend/test/integration/pages/desktop/download_page.js

27 lines
578 B
JavaScript
Raw Normal View History

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