diff --git a/.gitignore b/.gitignore index 7c94303b..b8a5ddf8 100644 --- a/.gitignore +++ b/.gitignore @@ -68,7 +68,7 @@ dist/**/* # Testing # multi-version test artifacts -examples/ui5-js-app/wdio-wdi5* +examples/ui5-js-app/wdio-wdi5* examples/ui5-js-app/webapp/index-*.html examples/ui5-js-app/dist/**/* @@ -79,3 +79,7 @@ examples/ui5-js-app/dist/**/* # js sample app screenshots examples/ui5-js-app/webapp/test/__screenshots__/**/*.png + +# btp +*.mtar +*.zip diff --git a/src/lib/wdi5-control.ts b/src/lib/wdi5-control.ts index 241d6e9a..551f0524 100644 --- a/src/lib/wdi5-control.ts +++ b/src/lib/wdi5-control.ts @@ -50,8 +50,12 @@ export class WDI5Control { this._webdriverRepresentation = webdriverRepresentation this._domId = domId - this.attachControlBridge(this._generatedUI5Methods as Array) - this.attachWdioControlBridge(this._generatedWdioMethods as Array) + if (this._generatedUI5Methods && this._generatedUI5Methods.length > 0) { + this.attachControlBridge(this._generatedUI5Methods as Array) + } + if (this._generatedWdioMethods && this._generatedWdioMethods.length > 0) { + this.attachWdioControlBridge(this._generatedWdioMethods as Array) + } this.setControlInfo()