1e62aa976d
this should greatly reduce the complexity of the l10n code and build pipeline and eliminate the most common error seen in sentry logs (no translate function)
28 lines
544 B
JavaScript
28 lines
544 B
JavaScript
/* global browser window */
|
|
class Page {
|
|
constructor(path) {
|
|
this.path = path;
|
|
}
|
|
|
|
open() {
|
|
browser.url(this.path);
|
|
this.waitForPageToLoad();
|
|
}
|
|
|
|
/**
|
|
* @function waitForPageToLoad
|
|
* @returns {Object} An object representing the page.
|
|
* @throws ElementNotFound
|
|
*/
|
|
waitForPageToLoad() {
|
|
browser.waitUntil(function() {
|
|
return browser.execute(function() {
|
|
return typeof window.appState !== 'undefined';
|
|
});
|
|
}, 3000);
|
|
browser.pause(100);
|
|
return this;
|
|
}
|
|
}
|
|
module.exports = Page;
|