tftsr-devops_investigation/node_modules/webdriverio/build/commands/browser/switchFrame.d.ts
Shaun Arman 8839075805 feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.

Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)

Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)

DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload

Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:36:25 -05:00

59 lines
2.9 KiB
TypeScript

import { type FlatContextTree } from '../../session/context.js';
import type { ChainablePromiseElement } from '../../types.js';
/**
* Switches the active context to a frame, e.g. an iframe on the page. There are multiple ways you can query a frame
* on the page:
*
* - If given a string it switches to the frame with a matching context id, url or url that contains that string
* ```ts
* // switch to a frame that has a specific url or contains a string in the url
* await browser.url('https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe')
* // Note: this frame is located in a nested iframe, however you only need to provide
* // the frame url of your desired frame
* await browser.switchFrame('https://www.w3schools.com')
* // check the title of the page
* console.log(await browser.execute(() => [document.title, document.URL]))
* // outputs: [ 'W3Schools Online Web Tutorials', 'https://www.w3schools.com/' ]
* ```
*
* - If you have the context id of the frame you can use it directly
* ```ts
* // switch to a frame that has a certain context id
* await browser.switchFrame('A5734774C41F8C91D483BDD4022B2EF3')
* ```
*
* - If given a WebdriverIO element that references an `iframe` element it will switch to that frame
* ```ts
* // switch to a frame element queried from current context
* await browser.switchFrame($('iframe'))
* ```
*
* - If given a function it will loop through all iframes on the page and call the function within the context
* object. The function should return a boolean indicating if the frame should be selected. The function
* will be executed within the browser and allows access to all Web APIs, e.g.:
* ```ts
* // switch to first frame that contains an element with id "#frameContent"
* await browser.switchFrame(() => Boolean(document.querySelector('#frameContent')))
* // switch to first frame that contains "webdriver" in the URL
* await browser.switchFrame(() => document.URL.includes('webdriver'))
* ```
*
* - If given `null` it will switch to the top level frame
* ```ts
* // first switch into a frame
* await browser.switchFrame($('iframe'))
* // do more automation within that frame, then ...
*
* // switch to the top level frame
* await browser.switchFrame(null)
* ```
*
* Once you switched to a frame, all further commands will be executed in the context of that frame,
* including navigating to different pages.
*
* @alias browser.switchFrame
* @param {string|object|function} context
* @returns {`Promise<string>`} the current active context id
*/
export declare function switchFrame(this: WebdriverIO.Browser, context: WebdriverIO.Element | ChainablePromiseElement | string | null | ((tree: FlatContextTree) => boolean | Promise<boolean>)): Promise<string | void>;
//# sourceMappingURL=switchFrame.d.ts.map