MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / constructor

Method constructor

lib/helper/Playwright.js:334–372  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

332 */
333class Playwright extends Helper {
334 constructor(config) {
335 super(config)
336
337 // playwright will be loaded dynamically in _init method
338
339 // set defaults
340 this.isRemoteBrowser = false
341 this.isRunning = false
342 this.isAuthenticated = false
343 this.sessionPages = {}
344 this.activeSessionName = ''
345 this.isElectron = false
346 this.isCDPConnection = false
347 this.electronSessions = []
348 this.storageState = null
349
350 // for network stuff
351 this.requests = []
352 this.recording = false
353 this.recordedAtLeastOnce = false
354
355 // for websocket messages
356 this.webSocketMessages = []
357 this.recordingWebSocketMessages = false
358 this.recordedWebSocketMessagesAtLeastOnce = false
359 this.cdpSession = null
360
361 // Add test failure tracking to prevent false positives
362 this.testFailures = []
363 this.hasCleanupError = false
364
365 // override defaults with config
366 this._setConfig(config)
367
368 // pass storageState directly (string path or object) and let Playwright handle errors/missing file
369 if (typeof config.storageState !== 'undefined') {
370 this.storageState = config.storageState
371 }
372 }
373
374 _validateConfig(config) {
375 const defaults = {

Callers

nothing calls this directly

Calls 1

_setConfigMethod · 0.95

Tested by

no test coverage detected