drop.chapril.org-firefoxsend/test/integration/pages/desktop/share_page.js

25 lines
541 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 SharePage extends Page {
2018-10-02 22:15:02 +02:00
constructor() {
super();
this.sharePageLocator = '#shareWrapper';
this.shareUrlLocator = '#fileUrl';
}
waitForPageToLoad() {
browser.waitUntil(() => {
browser.waitForExist(this.sharePageLocator);
2018-10-04 02:39:39 +02:00
const el = browser.element(this.sharePageLocator);
2018-10-02 22:15:02 +02:00
return browser.elementIdDisplayed(el.value.ELEMENT);
});
return this;
}
get fileUrl() {
return this.shareUrlLocator;
}
}
2018-10-04 02:39:39 +02:00
module.exports = SharePage;