Conversation
| if (!this.accessibility || !this.isAppAccessibility){ | ||
| return | ||
| } |
There was a problem hiding this comment.
@AdityaHirapara for ally platform validation. If the test with startAllyScanning function is running for both edge and chrome, it will give the following error with edge ( startAllyScanning not found ) as accessibility module will not not work for edge.
* fix: session name marking for browserstack-service via jasmine * fix: use sessionName from userCaps for Jasmine * chore: remove semicolon
| public async _setAnnotation(message: string) { | ||
| const autoInstance: AutomationFrameworkInstance = AutomationFramework.getTrackedInstance() | ||
| const browser = AutomationFramework.getDriver(autoInstance) as WebdriverIO.Browser | ||
|
|
||
| if (this.accessibility && isBrowserstackSession(browser)) { | ||
| await (browser as WebdriverIO.Browser).execute(`browserstack_executor: ${JSON.stringify({ | ||
| action: 'annotate', | ||
| arguments: { | ||
| data: message, | ||
| level: 'info' | ||
| } | ||
| })}`) | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
The _setAnnotation function is already present in the packages/wdio-browserstack-service/src/accessibility-handler.ts file. Please move this function to a utilities instead of creating a new function in this file.
| private async _setAnnotation(message: string) { | ||
| if (this._accessibility && isBrowserstackSession(this._browser)) { | ||
| await (this._browser as WebdriverIO.Browser).execute(`browserstack_executor: ${JSON.stringify({ | ||
| action: 'annotate', | ||
| arguments: { | ||
| data: message, | ||
| level: 'info' | ||
| } | ||
| })}`) | ||
| } | ||
| await setBrowserstackAnnotation(this._browser as WebdriverIO.Browser, message, Boolean(this._accessibility)) |
There was a problem hiding this comment.
Can we directly call setBrowserstackAnnotation function instead of calling _setAnnotation
There was a problem hiding this comment.
This is to keep the approach similar in both the files where it is used -> handler and module
…or authentication (webdriverio#14844) * SDK-4415 Added changes for central auth flow v2 * SDK-4415 * SDK-4415 Added change for adding header
Proposed changes
Types of changes
Checklist
Backport Request
//: # (The current
mainbranch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against thev8branch.)v9and doesn't need to be back-ported#XXXXXFurther comments
Reviewers: @webdriverio/project-committers