MCPcopy Index your code
hub / github.com/callstack/agent-device / constructor

Method constructor

src/cloud-webdriver/webdriver-client.ts:75–87  ·  view source on GitHub ↗
(options: WebDriverClientOptions)

Source from the content-addressed store, hash-verified

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', {

Callers

nothing calls this directly

Calls 3

withTrailingSlashFunction · 0.90
basicAuthHeaderFunction · 0.90

Tested by

no test coverage detected