(options: WebDriverClientOptions)
| 73 | private sessionId: string | undefined; |
| 74 | |
| 75 | constructor(options: WebDriverClientOptions) { |
| 76 | this.endpoint = withTrailingSlash(new URL(options.endpoint)); |
| 77 | this.headers = { |
| 78 | ...agentDeviceRequestHeaders(), |
| 79 | ...(options.auth ? { Authorization: basicAuthHeader(options.auth) } : {}), |
| 80 | ...options.headers, |
| 81 | }; |
| 82 | this.requestPolicy = { |
| 83 | timeoutMs: options.requestPolicy?.timeoutMs ?? 30_000, |
| 84 | retryAttempts: options.requestPolicy?.retryAttempts ?? 1, |
| 85 | retryDelayMs: options.requestPolicy?.retryDelayMs ?? 250, |
| 86 | }; |
| 87 | } |
| 88 | |
| 89 | async createSession(capabilities: Record<string, unknown>): Promise<WebDriverSession> { |
| 90 | const value = await this.requestValue('POST', '/session', { |
nothing calls this directly
no test coverage detected