Due to security restrictions: browserWindow is undefined, is there any alternatives

58 Views Asked by At

I have current app

    app = new Application({
            path: electronPath,
            chromeDriverArgs: ['remote-debugging-port=' + Math.floor(Math.random() * (9999 - 9000) + 9000)],
            args: [this.jsDir, '--env=e2e', '--core.no-db-encryption'],
            cwd: this.workingDir,
            webdriverOptions: ({'deprecationWarnings': false, 'headless': true, 'disable-dev-shm-usage': true}),
          });

When I try to call

    await this.app.start()
    
  1  this.app.browserWindow.focus();
  2  this.app.browserWindow.setAlwaysOnTop(true);
  3  this.app.browserWindow.maximize();

the I get the error:

     Cannot read property 'focus' of undefined

I know that the dev-team has done security restrictions in node of the tested app and therefore browserWindow will not be available

Is there any other alternatives to the the 3 Methods above?

0

There are 0 best solutions below