Skip to content

Commit

Permalink
fix(#241): rm warning if control was not instatiated by $$ (#242)
Browse files Browse the repository at this point in the history
Co-authored-by: dominik.feininger <[email protected]>
  • Loading branch information
dominikfeininger and dominikfeininger authored Apr 26, 2022
1 parent 2fae8f0 commit 0b6a111
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/**/*

Expand All @@ -79,3 +79,7 @@ examples/ui5-js-app/dist/**/*

# js sample app screenshots
examples/ui5-js-app/webapp/test/__screenshots__/**/*.png

# btp
*.mtar
*.zip
8 changes: 6 additions & 2 deletions src/lib/wdi5-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ export class WDI5Control {
this._webdriverRepresentation = webdriverRepresentation
this._domId = domId

this.attachControlBridge(this._generatedUI5Methods as Array<string>)
this.attachWdioControlBridge(this._generatedWdioMethods as Array<string>)
if (this._generatedUI5Methods && this._generatedUI5Methods.length > 0) {
this.attachControlBridge(this._generatedUI5Methods as Array<string>)
}
if (this._generatedWdioMethods && this._generatedWdioMethods.length > 0) {
this.attachWdioControlBridge(this._generatedWdioMethods as Array<string>)
}

this.setControlInfo()

Expand Down

0 comments on commit 0b6a111

Please sign in to comment.