I have an electron app which loads an HTML file on opening.
When I tried to wait for an element with waitUntil
method from the opening page, Spectron tries to find that while page loading and it crashes my app and app staying at the blank page. How can I wait for loading of this HTML?
My application launch code is below :
async start() {
try {
await this.spectron.start();
await this.focusOnWindow(0);
return this._checkWindowReady();
} catch (err) {
throw err;
}
}
beforeEach(async function (){
app = new SpectronApplication();
common = new CommonActions();
await app.start();
})