We could have `appInstall.install(manifestUrl, options)` method to include the above logic.
```
client.executeScript(function install(url) {
  window.wrappedJSObject.navigator.mozApps.install(url);
}, [url]);
// Click install button on the app install dialog
appInstall.waitForDialog(appInstall.installDialog);
appInstall.installButton.click();
```