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; 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.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?
optionalai?:object
ai.anthropicApiKey?
optionalanthropicApiKey?:string
ai.apiKey?
optionalapiKey?:string
ai.apiVersion?
optionalapiVersion?:string
ai.deployment?
optionaldeployment?:string
ai.endpoint?
optionalendpoint?:string
ai.maxTokens?
optionalmaxTokens?:number
ai.model?
optionalmodel?:string
ai.provider?
optionalprovider?:"openai"|"azure-openai"|"anthropic"
ai.temperature?
optionaltemperature?:number
auth?
optionalauth?:object
auth.baseUrl?
optionalbaseUrl?:string
auth.client?
optionalclient?:string
auth.language?
optionallanguage?:string
auth.password?
optionalpassword?:string
auth.strategy?
optionalstrategy?:"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?
optionalusername?:string
captureFailureArtifacts?
optionalcaptureFailureArtifacts?: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?
optionalcontrolDiscoveryTimeout?:number
controlTreeCapture?
optionalcontrolTreeCapture?:object
controlTreeCapture.enabled?
optionalenabled?:boolean
controlTreeCapture.maxControls?
optionalmaxControls?:number
controlTreeCapture.maxDepth?
optionalmaxDepth?:number
defaultMatchSubclasses?
optionaldefaultMatchSubclasses?:boolean
Default value for matchSubclasses on selectors that don't specify it.
discoveryStrategies?
optionaldiscoveryStrategies?: ("direct-id"|"recordreplay"|"registry")[]
ignoreAutoWaitUrls?
optionalignoreAutoWaitUrls?:string[]
interactionStrategy?
optionalinteractionStrategy?:"ui5-native"|"dom-first"|"opa5"
logLevel?
optionallogLevel?:"error"|"debug"|"warn"|"info"|"verbose"
odataTracing?
optionalodataTracing?:object
odataTracing.enabled?
optionalenabled?:boolean
odataTracing.urlPatterns?
optionalurlPatterns?:string[]
opa5?
optionalopa5?:object
opa5.autoWait?
optionalautoWait?:boolean
opa5.debug?
optionaldebug?:boolean
opa5.interactionTimeout?
optionalinteractionTimeout?:number
preferVisibleControls?
optionalpreferVisibleControls?:boolean
selectors?
optionalselectors?:object
selectors.defaultTimeout?
optionaldefaultTimeout?:number
Deprecated
Use top-level controlDiscoveryTimeout instead.
selectors.preferVisibleControls?
optionalpreferVisibleControls?:boolean
selectors.skipStabilityWait?
optionalskipStabilityWait?:boolean
skipStabilityWait?
optionalskipStabilityWait?:boolean
telemetry?
optionaltelemetry?:object
telemetry.batchTimeout?
optionalbatchTimeout?:number
telemetry.connectionString?
optionalconnectionString?:string
Azure Monitor connection string. Required when exporter is 'azure-monitor'.
telemetry.endpoint?
optionalendpoint?:string
telemetry.exporter?
optionalexporter?:"otlp"|"azure-monitor"|"jaeger"
telemetry.maxQueueSize?
optionalmaxQueueSize?:number
telemetry.metrics?
optionalmetrics?:boolean
telemetry.openTelemetry?
optionalopenTelemetry?:boolean
telemetry.protocol?
optionalprotocol?:"http"|"grpc"
telemetry.resourceAttributes?
optionalresourceAttributes?:Record<string,string>
telemetry.serviceName?
optionalserviceName?:string
ui5WaitTimeout?
optionalui5WaitTimeout?: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' });