Skip to main content
Version: 1.x

Interface: PageContext

Full page context snapshot used as AI input for test generation.

Remarks​

Built by buildPageContext() / discoverPage() after waitForUI5Stable(). All arrays are partitioned views of the same discovered controls.

Intent​

Provide structured page state for LLM-driven test authoring.

Capability​

pramanAI.buildContext

Example​

const ctx: PageContext = {
url: 'https://my.fiori.app/launchpad',
ui5Version: '1.120.3',
controls: [...],
formFields: [...],
buttons: [...],
tables: [...],
navigationElements: [...],
timestamp: new Date().toISOString(),
};

Properties​

ariaSnapshot?​

readonly optional ariaSnapshot?: string

Aria snapshot of the page for AI grounding (Playwright 1.60+). Includes element references ([ref=e2]), <iframe> snapshots (mode:'ai'), and bounding boxes ([box=x,y,w,h]). Absent when Playwright lacks aria snapshots, when ai.includeAriaSnapshot is false, or when capture fails.


buttons​

readonly buttons: DiscoveredControl[]

Controls classified as buttons or clickable triggers.


controls​

readonly controls: DiscoveredControl[]

All discovered controls on the page.


formFields​

readonly formFields: DiscoveredControl[]

Controls classified as form fields (inputs, selects, etc.).


readonly navigationElements: DiscoveredControl[]

Controls classified as navigation elements (links, tiles, etc.).


tables​

readonly tables: DiscoveredControl[]

Controls classified as data tables or lists.


timestamp​

readonly timestamp: string

ISO 8601 timestamp when the page context was captured.


ui5Version?​

readonly optional ui5Version?: string

UI5 framework version detected on the page, if available.


url​

readonly url: string

Current page URL at time of discovery.