MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / parseBidiMessage

Function parseBidiMessage

packages/webdriver/src/utils.ts:516–527  ·  view source on GitHub ↗
(this: EventEmitter, data: ArrayBuffer)

Source from the content-addressed store, hash-verified

514}
515
516export function parseBidiMessage (this: EventEmitter, data: ArrayBuffer) {
517 try {
518 const payload: Event = JSON.parse(data.toString())
519 if (payload.type !== 'event') {
520 return
521 }
522
523 this.emit(payload.method as string, payload.params)
524 } catch (err) {
525 log.error(`Failed parse WebDriver Bidi message: ${(err as Error).message}`)
526 }
527}
528
529/**
530 * Masks the `text` parameter in a WebDriver command if masking is enabled in the options.

Callers

nothing calls this directly

Calls 2

emitMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…