Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
34 lines
547 B
JavaScript
Executable file
34 lines
547 B
JavaScript
Executable file
'use strict';
|
|
|
|
function Base(client, origin) {
|
|
this.client = client;
|
|
this.origin = origin;
|
|
|
|
this.elements = {};
|
|
}
|
|
|
|
Base.prototype = {
|
|
launch: function() {
|
|
this.client.apps.launch(this.origin);
|
|
|
|
this.switchTo();
|
|
},
|
|
|
|
switchTo: function() {
|
|
this.client.switchToFrame();
|
|
this.client.apps.switchToApp(this.origin);
|
|
|
|
this.waitForReady();
|
|
},
|
|
|
|
close: function() {
|
|
this.client.apps.close(this.origin);
|
|
},
|
|
|
|
waitForReady: function() {
|
|
this.client.helper.waitForElement('body');
|
|
}
|
|
};
|
|
|
|
|
|
module.exports = Base;
|