(config)
| 232 | */ |
| 233 | class Puppeteer extends Helper { |
| 234 | constructor(config) { |
| 235 | super(config) |
| 236 | |
| 237 | // puppeteer will be loaded dynamically in _init method |
| 238 | // set defaults |
| 239 | this.isRemoteBrowser = false |
| 240 | this.isRunning = false |
| 241 | this.isAuthenticated = false |
| 242 | this.sessionPages = {} |
| 243 | this.activeSessionName = '' |
| 244 | |
| 245 | // for network stuff |
| 246 | this.requests = [] |
| 247 | this.recording = false |
| 248 | this.recordedAtLeastOnce = false |
| 249 | |
| 250 | // for websocket messages |
| 251 | this.webSocketMessages = [] |
| 252 | this.recordingWebSocketMessages = false |
| 253 | this.recordedWebSocketMessagesAtLeastOnce = false |
| 254 | this.cdpSession = null |
| 255 | |
| 256 | // override defaults with config |
| 257 | this._setConfig(config) |
| 258 | } |
| 259 | |
| 260 | _validateConfig(config) { |
| 261 | const defaults = { |
nothing calls this directly
no test coverage detected