Skip to main content
Version: 1.x

Function: defineConfig()

defineConfig(input): object

Type helper for Praman config files — returns input unchanged.

Parameters​

input​

Config input to pass through.

ai?​

{ anthropicApiKey?: string; apiKey?: string; apiVersion?: string; deployment?: string; endpoint?: string; includeAriaSnapshot?: boolean; maxTokens?: number; model?: string; provider?: "openai" | "azure-openai" | "anthropic"; temperature?: number; } = ...

ai.anthropicApiKey?​

string = ...

ai.apiKey?​

string = ...

ai.apiVersion?​

string = ...

ai.deployment?​

string = ...

ai.endpoint?​

string = ...

ai.includeAriaSnapshot?​

boolean = ...

Include an aria snapshot in pramanAI.buildContext() output (Playwright 1.60+). On unless set to false.

ai.maxTokens?​

number = ...

ai.model?​

string = ...

ai.provider?​

"openai" | "azure-openai" | "anthropic" = ...

ai.temperature?​

number = ...

auth?​

{ baseUrl?: string; client?: string; language?: string; password?: string; strategy?: "custom" | "btp-saml" | "basic" | "office365"; username?: string; } = ...

auth.baseUrl?​

string = ...

auth.client?​

string = ...

auth.language?​

string = ...

auth.password?​

string = ...

auth.strategy?​

"custom" | "btp-saml" | "basic" | "office365" = ...

Auth strategy for SAP login.

Remarks

  • basic: On-premise form-based login (onprem-strategy)
  • btp-saml: BTP Cloud SAML via IAS (cloud-saml-strategy)
  • office365: Microsoft 365 / Azure AD SSO (office365-strategy)
  • custom: User-provided login function

For API-based, certificate, or multi-tenant auth, see the authentication guide — these are configured programmatically.

auth.username?​

string = ...

captureFailureArtifacts?​

boolean = ...

Whether to auto-capture diagnostic artifacts (screenshot, control tree, page context) on test failure.

Remarks

When true (default), the failure artifacts fixture automatically attaches a screenshot (PNG), UI5 control tree snapshot (JSON), and page metadata (JSON) to the test report on any test failure. Set to false to disable.

controlDiscoveryTimeout?​

number = ...

controlTreeCapture?​

{ enabled?: boolean; maxControls?: number; maxDepth?: number; } = ...

controlTreeCapture.enabled?​

boolean = ...

controlTreeCapture.maxControls?​

number = ...

controlTreeCapture.maxDepth?​

number = ...

defaultMatchSubclasses?​

boolean = ...

Default value for matchSubclasses on selectors that don't specify it.

discoveryStrategies?​

("direct-id" | "recordreplay" | "registry")[] = ...

ignoreAutoWaitUrls?​

string[] = ...

interactionStrategy?​

"ui5-native" | "dom-first" | "opa5" = ...

logLevel?​

"error" | "debug" | "warn" | "info" | "verbose" = ...

odataTracing?​

{ enabled?: boolean; urlPatterns?: string[]; } = ...

odataTracing.enabled?​

boolean = ...

odataTracing.urlPatterns?​

string[] = ...

opa5?​

{ autoWait?: boolean; debug?: boolean; interactionTimeout?: number; } = ...

opa5.autoWait?​

boolean = ...

opa5.debug?​

boolean = ...

opa5.interactionTimeout?​

number = ...

preferVisibleControls?​

boolean = ...

selectors?​

{ defaultTimeout?: number; preferVisibleControls?: boolean; skipStabilityWait?: boolean; } = ...

selectors.defaultTimeout?​

number = ...

Deprecated

Use top-level controlDiscoveryTimeout instead.

selectors.preferVisibleControls?​

boolean = ...

selectors.skipStabilityWait?​

boolean = ...

skipStabilityWait?​

boolean = ...

telemetry?​

{ batchTimeout?: number; connectionString?: string; endpoint?: string; exporter?: "otlp" | "azure-monitor" | "jaeger"; maxQueueSize?: number; metrics?: boolean; openTelemetry?: boolean; protocol?: "http" | "grpc"; resourceAttributes?: Record<string, string>; serviceName?: string; } = ...

telemetry.batchTimeout?​

number = ...

telemetry.connectionString?​

string = ...

Azure Monitor connection string. Required when exporter is 'azure-monitor'.

telemetry.endpoint?​

string = ...

telemetry.exporter?​

"otlp" | "azure-monitor" | "jaeger" = ...

telemetry.maxQueueSize?​

number = ...

telemetry.metrics?​

boolean = ...

telemetry.openTelemetry?​

boolean = ...

telemetry.protocol?​

"http" | "grpc" = ...

telemetry.resourceAttributes?​

Record<string, string> = ...

telemetry.serviceName?​

string = ...

ui5WaitTimeout?​

number = ...

Returns​

The input unchanged.

ai?​

optional ai?: object

ai.anthropicApiKey?​

optional anthropicApiKey?: string

ai.apiKey?​

optional apiKey?: string

ai.apiVersion?​

optional apiVersion?: string

ai.deployment?​

optional deployment?: string

ai.endpoint?​

optional endpoint?: string

ai.includeAriaSnapshot?​

optional includeAriaSnapshot?: boolean

Include an aria snapshot in pramanAI.buildContext() output (Playwright 1.60+). On unless set to false.

ai.maxTokens?​

optional maxTokens?: number

ai.model?​

optional model?: string

ai.provider?​

optional provider?: "openai" | "azure-openai" | "anthropic"

ai.temperature?​

optional temperature?: number

auth?​

optional auth?: object

auth.baseUrl?​

optional baseUrl?: string

auth.client?​

optional client?: string

auth.language?​

optional language?: string

auth.password?​

optional password?: string

auth.strategy?​

optional strategy?: "custom" | "btp-saml" | "basic" | "office365"

Auth strategy for SAP login.

Remarks​
  • basic: On-premise form-based login (onprem-strategy)
  • btp-saml: BTP Cloud SAML via IAS (cloud-saml-strategy)
  • office365: Microsoft 365 / Azure AD SSO (office365-strategy)
  • custom: User-provided login function

For API-based, certificate, or multi-tenant auth, see the authentication guide — these are configured programmatically.

auth.username?​

optional username?: string

captureFailureArtifacts?​

optional captureFailureArtifacts?: boolean

Whether to auto-capture diagnostic artifacts (screenshot, control tree, page context) on test failure.

Remarks​

When true (default), the failure artifacts fixture automatically attaches a screenshot (PNG), UI5 control tree snapshot (JSON), and page metadata (JSON) to the test report on any test failure. Set to false to disable.

controlDiscoveryTimeout?​

optional controlDiscoveryTimeout?: number

controlTreeCapture?​

optional controlTreeCapture?: object

controlTreeCapture.enabled?​

optional enabled?: boolean

controlTreeCapture.maxControls?​

optional maxControls?: number

controlTreeCapture.maxDepth?​

optional maxDepth?: number

defaultMatchSubclasses?​

optional defaultMatchSubclasses?: boolean

Default value for matchSubclasses on selectors that don't specify it.

discoveryStrategies?​

optional discoveryStrategies?: ("direct-id" | "recordreplay" | "registry")[]

ignoreAutoWaitUrls?​

optional ignoreAutoWaitUrls?: string[]

interactionStrategy?​

optional interactionStrategy?: "ui5-native" | "dom-first" | "opa5"

logLevel?​

optional logLevel?: "error" | "debug" | "warn" | "info" | "verbose"

odataTracing?​

optional odataTracing?: object

odataTracing.enabled?​

optional enabled?: boolean

odataTracing.urlPatterns?​

optional urlPatterns?: string[]

opa5?​

optional opa5?: object

opa5.autoWait?​

optional autoWait?: boolean

opa5.debug?​

optional debug?: boolean

opa5.interactionTimeout?​

optional interactionTimeout?: number

preferVisibleControls?​

optional preferVisibleControls?: boolean

selectors?​

optional selectors?: object

selectors.defaultTimeout?​

optional defaultTimeout?: number

Deprecated​

Use top-level controlDiscoveryTimeout instead.

selectors.preferVisibleControls?​

optional preferVisibleControls?: boolean

selectors.skipStabilityWait?​

optional skipStabilityWait?: boolean

skipStabilityWait?​

optional skipStabilityWait?: boolean

telemetry?​

optional telemetry?: object

telemetry.batchTimeout?​

optional batchTimeout?: number

telemetry.connectionString?​

optional connectionString?: string

Azure Monitor connection string. Required when exporter is 'azure-monitor'.

telemetry.endpoint?​

optional endpoint?: string

telemetry.exporter?​

optional exporter?: "otlp" | "azure-monitor" | "jaeger"

telemetry.maxQueueSize?​

optional maxQueueSize?: number

telemetry.metrics?​

optional metrics?: boolean

telemetry.openTelemetry?​

optional openTelemetry?: boolean

telemetry.protocol?​

optional protocol?: "http" | "grpc"

telemetry.resourceAttributes?​

optional resourceAttributes?: Record<string, string>

telemetry.serviceName?​

optional serviceName?: string

ui5WaitTimeout?​

optional ui5WaitTimeout?: number

Remarks​

Used in praman.config.ts for IDE autocomplete and type checking.

Guarantee​

Returns the input unchanged (identity function for type inference).

Example​

// praman.config.ts
import { defineConfig } from 'playwright-praman';
export default defineConfig({ logLevel: 'debug' });