Skip to content

Automate browser based workflows with AI

SKY-13326 Show reconnectable Google account notices in Copilot (#8231)

Andrew Neilsonc6ad8161ee77
diff --git a/docs/api-reference/openapi.json b/docs/api-reference/openapi.json
index 5cbfd2363..3b6fa741d 100644
--- a/docs/api-reference/openapi.json
+++ b/docs/api-reference/openapi.json
@@ -3912,6 +3912,9 @@
}
}
},
+ "400": {
+ "description": "Requested timeout exceeds the 240-minute maximum"
+ },
"403": {
"description": "Unauthorized - Invalid or missing authentication"
},
@@ -8622,6 +8625,17 @@
"title": "Max Retries",
"default": 0
},
+ "max_steps_per_run": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Max Steps Per Run"
+ },
"parameter_keys": {
"anyOf": [
{
@@ -11321,7 +11335,7 @@
}
],
"title": "Timeout",
- "description": "Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least 5; values above 240 are capped at 240. Defaults to 60.",
+ "description": "Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60.",
"default": 60
},
"proxy_location": {
@@ -26328,6 +26342,10 @@
"title": "Next Loop On Failure",
"default": false
},
+ "engine": {
+ "$ref": "#/components/schemas/RunEngine",
+ "default": "skyvern-1.0"
+ },
"complete_criterion": {
"anyOf": [
{
@@ -26364,6 +26382,17 @@
],
"title": "Error Code Mapping"
},
+ "max_steps_per_run": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Max Steps Per Run"
+ },
"parameter_keys": {
"anyOf": [
{
diff --git a/docs/cloud/browser-management/browser-sessions.mdx b/docs/cloud/browser-management/browser-sessions.mdx
index 71142188d..5484f7473 100644
--- a/docs/cloud/browser-management/browser-sessions.mdx
+++ b/docs/cloud/browser-management/browser-sessions.mdx
@@ -49,7 +49,7 @@ Click the **Create Browser Session** button at the top of the Browsers page. A p
| Setting | What it does |
|---------|-------------|
-| **Timeout** | How long the session stays open, in minutes. Min: 5; values above 240 (4 hours) are capped at 240. Default: 60. |
+| **Timeout** | How long the session stays open, in minutes. Min: 5; max: 240 (4 hours) — requests above 240 are rejected. Longer durations are available on the enterprise plan (contact [email protected]). Default: 60. |
| **Proxy Location** | Route the browser through a residential proxy in a specific country. Default: US. |
| **Browser Type** | Chrome (default, widest compatibility) or Microsoft Edge. |
| **Extensions** | Optional add-ons: **Ad Blocker** (removes overlay ads that interfere with clicks) and **Captcha Solver** (auto-solves CAPTCHAs). |
diff --git a/docs/developers/browser-automations/handle-browsers.mdx b/docs/developers/browser-automations/handle-browsers.mdx
index 585dc4959..02f431003 100644
--- a/docs/developers/browser-automations/handle-browsers.mdx
+++ b/docs/developers/browser-automations/handle-browsers.mdx
@@ -39,7 +39,7 @@ const page = await browser.getWorkingPage();
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
-| `timeout` | `int` | `None` | Session timeout in minutes (min 5, capped at 240). Server default: 60 minutes |
+| `timeout` | `int` | `None` | Session timeout in minutes (min 5, max 240; higher values are rejected). Server default: 60 minutes |
| `proxy_location` | `ProxyLocation` | `None` | Route traffic through a geographic proxy |
The browser stays alive until `timeout` expires or you call `browser.close()`.
diff --git a/docs/developers/optimization/browser-sessions.mdx b/docs/developers/optimization/browser-sessions.mdx
index b7b1f5269..1434fb63c 100644
--- a/docs/developers/optimization/browser-sessions.mdx
+++ b/docs/developers/optimization/browser-sessions.mdx
@@ -82,7 +82,7 @@ curl -X POST "https://api.skyvern.com/v1/browser_sessions" \
| Parameter | Type | Description |
|-----------|------|-------------|
-| `timeout` | integer | Session lifetime in minutes. Min: 5. Values above 240 (4 hours) are capped at 240. Default: `60` |
+| `timeout` | integer | Session lifetime in minutes. Min: 5. Max: 240 (4 hours) — requests above 240 are rejected. Default: `60` |
| `proxy_location` | string | Geographic proxy location (Cloud only). See [Proxy & Geolocation](/developers/going-to-production/proxy-geolocation) for available options |
| `browser_type` | string | Browser type: `chrome` or `msedge`. If omitted, Skyvern picks a managed default that may be a hardened stealth Chromium build rather than Chrome. Set it explicitly to select the engine when no `browser_profile_id` is used — a supplied profile's source browser type takes precedence. See [Choose the right browser type](#choose-the-right-browser-type) |
| `extensions` | array | Extensions to install: `ad-blocker`, `captcha-solver` |
diff --git a/docs/sdk-reference/browser-automation/launch-cloud-browser.mdx b/docs/sdk-reference/browser-automation/launch-cloud-browser.mdx
index 98ed2cd82..627b60ad7 100644
--- a/docs/sdk-reference/browser-automation/launch-cloud-browser.mdx
+++ b/docs/sdk-reference/browser-automation/launch-cloud-browser.mdx
@@ -37,7 +37,7 @@ await browser.close();
| Parameter (Python) | Parameter (TS) | Type | Required | Default | Description |
|-------------------|----------------|------|----------|---------|-------------|
-| `timeout` | `timeout` | `int` / `number` | No | `60` | Session timeout in minutes (min 5, capped at 240). |
+| `timeout` | `timeout` | `int` / `number` | No | `60` | Session timeout in minutes (min 5, max 240; higher values are rejected). |
| `proxy_location` | `proxyLocation` | `ProxyLocation` | No | `None` / `undefined` | Geographic proxy location for browser traffic. |
## Returns `SkyvernBrowser`
diff --git a/docs/sdk-reference/browser-automation/use-cloud-browser.mdx b/docs/sdk-reference/browser-automation/use-cloud-browser.mdx
index 807296fa8..2943779a2 100644
--- a/docs/sdk-reference/browser-automation/use-cloud-browser.mdx
+++ b/docs/sdk-reference/browser-automation/use-cloud-browser.mdx
@@ -23,7 +23,7 @@ Same parameters as `launch_cloud_browser` / `launchCloudBrowser`. Options are on
| Parameter (Python) | Parameter (TS) | Type | Required | Default | Description |
|-------------------|----------------|------|----------|---------|-------------|
-| `timeout` | `timeout` | `int` / `number` | No | `60` | Session timeout in minutes (min 5, capped at 240). |
+| `timeout` | `timeout` | `int` / `number` | No | `60` | Session timeout in minutes (min 5, max 240; higher values are rejected). |
| `proxy_location` | `proxyLocation` | `ProxyLocation` | No | `None` / `undefined` | Geographic proxy location for browser traffic. |
## Returns `SkyvernBrowser`
diff --git a/docs/sdk-reference/browser-sessions/create-browser-session.mdx b/docs/sdk-reference/browser-sessions/create-browser-session.mdx
index 09eb4c54f..2238e3ddb 100644
--- a/docs/sdk-reference/browser-sessions/create-browser-session.mdx
+++ b/docs/sdk-reference/browser-sessions/create-browser-session.mdx
@@ -29,7 +29,7 @@ console.log(session.browser_session_id); // pbs_abc123
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
-| `timeout` | `int` | No | `60` | Session timeout in minutes (min 5, capped at 240). Timer starts after the session is ready. |
+| `timeout` | `int` | No | `60` | Session timeout in minutes (min 5, max 240; higher values are rejected). Timer starts after the session is ready. |
| `proxy_location` | `ProxyLocation` | No | `None` | Route browser traffic through a geographic proxy. |
| `extensions` | `list[Extensions]` | No | `None` | Browser extensions to install. Options: `"ad-blocker"`, `"captcha-solver"`. |
| `browser_type` | `PersistentBrowserType` | No | `None` | Browser type. Options: `"chrome"`, `"msedge"`. |
diff --git a/docs/snippets/mcp-content.mdx b/docs/snippets/mcp-content.mdx
index f04657289..1be77a89b 100644
--- a/docs/snippets/mcp-content.mdx
+++ b/docs/snippets/mcp-content.mdx
@@ -23,7 +23,7 @@ You have three ways to connect a client to Skyvern:
| | OAuth (sign in with browser) | API key | Local mode |
| -------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
-| **Best for** | Claude Code, Codex CLI, Cursor, ChatGPT, and other clients that support MCP OAuth | Claude Desktop, Windsurf, Hermes, OpenClaw, headless/CI flows, or any client where you prefer a static key | Self-hosting Skyvern |
+| **Best for** | Claude Code, Claude.ai / Claude Desktop connectors, Codex CLI, Cursor, ChatGPT, and other clients that support MCP OAuth | Claude Desktop, Windsurf, Hermes, OpenClaw, headless/CI flows, or any client where you prefer a static key | Self-hosting Skyvern |
| **Install required** | None | None | Python 3.11+ and `pip install "skyvern[server]"` |
| **Credential** | Browser sign-in with your Skyvern account | API key from [app.skyvern.com](https://app.skyvern.com) | API key from your self-hosted instance |
| **Where it runs** | Directly against Skyvern Cloud over HTTPS | Directly against Skyvern Cloud over HTTPS | Local Python process talking to your Skyvern server |
@@ -36,7 +36,7 @@ Skyvern Cloud exposes the full MCP tool surface at `https://api.skyvern.com/mcp/
## Option A: Sign in with browser (OAuth)
-Supported clients today: **Claude Code**, **Codex CLI**, **Cursor**, **ChatGPT** (custom connector), and other MCP clients that support remote HTTP servers with OAuth. Skyvern Cloud publishes standard MCP OAuth discovery metadata, so supported clients can start browser sign-in without a static `CLIENT_ID` or `CLIENT_SECRET` in your config.
+Supported clients today: **Claude Code**, **Claude.ai / Claude Desktop** (custom connector), **Codex CLI**, **Cursor**, **ChatGPT** (custom connector), and other MCP clients that support remote HTTP servers with OAuth. Skyvern Cloud publishes standard MCP OAuth discovery metadata, so supported clients can start browser sign-in without a static `CLIENT_ID` or `CLIENT_SECRET` in your config.
There is **no install step**. You do not need `pip install skyvern`, Node.js, or an API key.
@@ -120,12 +120,25 @@ This is not the ChatGPT App Directory. You can add Skyvern as a custom MCP conne
No API key is required — OAuth handles authentication. If your account does not yet show the Connectors option, check **Settings → Beta features** to enable it.
+</Tab>
+<Tab title="Claude.ai / Claude Desktop">
+
+**Custom connector**
+
+1. In Claude or Claude Desktop, open **Settings → Connectors**.
+2. Click **Add custom connector**.
+3. Enter `Skyvern` as the connector name and `https://api.skyvern.com/mcp/` as the connector URL.
+4. Click **Add**, then **Connect**, and complete the browser sign-in with your Skyvern account.
+5. Enable Skyvern from the **Search and tools** menu in a Claude chat.
+
+No API key is required — OAuth handles authentication. This remote connector is separate from the local Claude Desktop extension install described in the API-key section below.
+
</Tab>
</Tabs>
## Option B: API key
-Use this path for Claude Desktop, Windsurf, Hermes, OpenClaw, headless/CI flows, and any client that does not yet support the MCP OAuth flow. You can also use it with Claude Code, Codex CLI, or Cursor if you prefer a static key (for example, on a server with no browser available for the OAuth callback).
+Use this path for Windsurf, Hermes, OpenClaw, headless/CI flows, and any client that does not yet support the MCP OAuth flow. You can also use it with Claude Code, Claude Desktop, Codex CLI, or Cursor if you prefer a static key (for example, on a server with no browser available for the OAuth callback).
Get your API key from [Settings](https://app.skyvern.com) in the Skyvern dashboard, then pick your client below.
diff --git a/fern/openapi/skyvern_openapi.json b/fern/openapi/skyvern_openapi.json
index b856c785c..d666e7e31 100644
--- a/fern/openapi/skyvern_openapi.json
+++ b/fern/openapi/skyvern_openapi.json
@@ -10721,7 +10721,7 @@
}
],
"title": "Timeout",
- "description": "Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least 5; values above 240 are capped at 240. Defaults to 60.",
+ "description": "Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60.",
"default": 60
},
"proxy_location": {
diff --git a/pyproject.toml b/pyproject.toml
index 9999678aa..ebd3f81e0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "skyvern"
-version = "1.0.48"
+version = "1.0.50"
description = ""
authors = [{ name = "Skyvern AI", email = "[email protected]" }]
requires-python = ">=3.11,<3.15"
diff --git a/skyvern-frontend/src/components/BrowserStream.test.tsx b/skyvern-frontend/src/components/BrowserStream.test.tsx
index f3d2bb961..38a018585 100644
--- a/skyvern-frontend/src/components/BrowserStream.test.tsx
+++ b/skyvern-frontend/src/components/BrowserStream.test.tsx
@@ -614,6 +614,9 @@ describe("BrowserStream", () => {
const rfb = mocks.rfbInstances[0] as unknown as {
emit: (type: string, detail?: unknown) => void;
};
+ await waitFor(() => {
+ expect(mocks.settingsStore.setIsUsingABrowser).toHaveBeenCalledWith(true);
+ });
mocks.autoConnect.value = false;
rfb.emit("disconnect", { clean: false });
diff --git a/skyvern-frontend/src/routes/workflows/copilot/NarrativeView.test.ts b/skyvern-frontend/src/routes/workflows/copilot/NarrativeView.test.ts
index 54d7c91bf..2a835afa8 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/NarrativeView.test.ts
+++ b/skyvern-frontend/src/routes/workflows/copilot/NarrativeView.test.ts
@@ -1,6 +1,5 @@
import { describe, expect, it } from "vitest";
-import { shouldShowFixCard } from "./cards/FixCard";
import { getReviewGateVerdict } from "./cards/ReviewGateCard";
import { derivePhases } from "./copilotPhases";
import {
@@ -1630,8 +1629,8 @@ describe("humanizeJudgeText", () => {
});
it("leaves ordinary assistant prose alone, even when it ends like the instruction", () => {
- // The trailing-prefix scan must never reach free prose: these reach FixCard and
- // RollupCard headlines, which are not judge text.
+ // The trailing-prefix scan must never reach free prose: the same helper
+ // runs over assistant prose on the headline paths, which is not judge text.
for (const prose of [
"Choose option A",
"Click the button labelled Add",
@@ -1794,9 +1793,8 @@ describe("a real cancel's backend payload still renders neutrally", () => {
expect(summary.accent).not.toBe("fail");
});
- it("does not offer to fix a run the user stopped, or redden the rail", () => {
+ it("does not redden the rail for a run the user stopped", () => {
const turn = hydrateNarrativeFromPayload(cancelledPayload())!;
- expect(shouldShowFixCard(turn)).toBe(false);
const phases = derivePhases(turn);
const byId = Object.fromEntries(phases.map((p) => [p.id, p.status]));
expect(byId.done).toBe("stopped");
@@ -1861,6 +1859,5 @@ describe("a real cancel's backend payload still renders neutrally", () => {
})!;
expect(turn.blocks[0]?.state).toBe("failed");
expect(computeTurnSummary(turn).isFail).toBe(true);
- expect(shouldShowFixCard(turn)).toBe(true);
});
});
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.historyRace.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.historyRace.test.tsx
index b7330fdb3..fb2a647ce 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.historyRace.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.historyRace.test.tsx
@@ -296,40 +296,6 @@ describe("WorkflowCopilotChat — history-race action-card gating (item 1)", ()
await flushHistory(historyData({ workflow_copilot_chat_id: "chat_other" }));
});
-
- it("hides the docked FixCard while a chat switch is loading (flag-off)", async () => {
- await renderChat({ docked: true });
- await flushHistory(
- historyData({
- chat_history: [
- aiHistoryMessage(
- narrativePayload({
- terminal: "error",
- terminalMessage: "The last run hit an error.",
- narrativeSummary: "The last run hit an error.",
- }),
- "The last run hit an error.",
- ),
- ],
- }),
- );
-
- await waitFor(() =>
- expect(
- screen.getByRole("button", { name: "Fix with Copilot" }),
- ).toBeTruthy(),
- );
-
- fireEvent.click(screen.getByText("mock-select-history-chat"));
-
- await waitFor(() =>
- expect(
- screen.queryByRole("button", { name: "Fix with Copilot" }),
- ).toBeNull(),
- );
-
- await flushHistory(historyData({ workflow_copilot_chat_id: "chat_other" }));
- });
});
// Item 2 (SKY-12384): a live_browser prompt queued before the initial history
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.instantAck.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.instantAck.test.tsx
index ac50bce9d..223d9e175 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.instantAck.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.instantAck.test.tsx
@@ -16,7 +16,6 @@ import {
type StreamBody = {
message: string;
workflow_run_id?: string | null;
- fix_origin?: boolean;
};
type StreamCall = {
body: StreamBody;
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
index 67003e0d8..e52e076c4 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
@@ -1275,30 +1275,6 @@ describe("WorkflowCopilotChat — a repeat of the turn's own message is not re-r
).toBe("ask");
});
- it("drains an identical queued prompt when the turn opened as a fix", async () => {
- await renderChat({
- initialMessage: "fix the failing step",
- initialMessageFixOrigin: true,
- });
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
- expect(
- (streamCalls[0]!.body as unknown as { fix_origin: boolean }).fix_origin,
- ).toBe(true);
-
- // The user retypes the same text; this one is a plain send, not a fix, so
- // it is a different request even though the words match.
- await submit("fix the failing step");
- expect(postStreaming).toHaveBeenCalledTimes(1);
-
- await completeOldestStream("fix applied");
-
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(2));
- expect(streamCalls[1]!.body.message).toBe("fix the failing step");
- expect(
- (streamCalls[1]!.body as unknown as { fix_origin: boolean }).fix_origin,
- ).toBe(false);
- });
-
it("drains a queued block build that repeats the message of the turn in flight", async () => {
await renderChat();
await act(async () => {
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx
index 334196580..1377e8d4d 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx
@@ -16,7 +16,6 @@ import {
type StreamBody = {
message: string;
workflow_run_id?: string | null;
- fix_origin?: boolean;
};
type StreamCall = {
body: StreamBody;
@@ -152,11 +151,6 @@ const BOOLEAN_FLAGS: Record<string, boolean> = {
type ChatProps = {
workflowRunId?: string | null;
- initialMessage?: string;
- initialMessageFixOrigin?: boolean;
- requiresLiveBrowser?: boolean;
- isLiveBrowserReady?: boolean;
- liveBrowserSessionId?: string | null;
};
function chatUi(props: ChatProps) {
@@ -243,138 +237,3 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {
expect(streamCalls[0]?.body.workflow_run_id).toBe("wr_route");
});
});
-
-describe("WorkflowCopilotChat — fix-origin signal", () => {
- it("auto-sends fix_origin:true when the seed originates from Fix with Copilot", async () => {
- await renderChat({
- workflowRunId: "wr_1",
- initialMessage:
- "Diagnose why this run failed, then fix the workflow so it succeeds.",
- initialMessageFixOrigin: true,
- });
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
-
- expect(streamCalls[0]?.body.fix_origin).toBe(true);
- expect(streamCalls[0]?.body.workflow_run_id).toBe("wr_1");
- });
-
- it("does not set fix_origin for a seed that is not a fix origin", async () => {
- await renderChat({
- workflowRunId: "wr_1",
- initialMessage: "Build a workflow that scrapes prices.",
- initialMessageFixOrigin: false,
- });
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
-
- expect(streamCalls[0]?.body.fix_origin).toBe(false);
- });
-
- it("does not set fix_origin for a normal typed turn", async () => {
- await renderChat({ workflowRunId: "wr_1" });
- await submit("this run failed, fix it");
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
-
- expect(streamCalls[0]?.body.fix_origin).toBe(false);
- });
-
- it("clears the fix-origin signal when a queued fix seed is cancelled (no leak to the next turn)", async () => {
- const view = render(
- chatUi({
- workflowRunId: "wr_1",
- requiresLiveBrowser: true,
- isLiveBrowserReady: false,
- initialMessage: "Diagnose why this run failed, then fix it.",
- initialMessageFixOrigin: true,
- }),
- );
- // Live browser not ready: the fix seed queues (a user bubble appears) instead of sending.
- await waitFor(() =>
- expect(screen.getByText(/Diagnose why this run failed/i)).toBeTruthy(),
- );
- expect(postStreaming).not.toHaveBeenCalled();
-
- // Cancel the queued prompt (Escape), then let the live browser become ready.
- await act(async () => {
- window.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape" }));
- });
- view.rerender(
- chatUi({
- workflowRunId: "wr_1",
- requiresLiveBrowser: true,
- isLiveBrowserReady: true,
- }),
- );
-
- // A normal typed turn after the cancel must not inherit the cancelled fix-origin signal.
- await submit("add a step that downloads the invoice");
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
- expect(streamCalls[0]?.body.fix_origin).toBe(false);
- });
-
- it("clears the fix-origin signal when a queued fix seed is discarded by New chat (no leak to the next turn)", async () => {
- const view = render(
- chatUi({
- workflowRunId: "wr_1",
- requiresLiveBrowser: true,
- isLiveBrowserReady: false,
- initialMessage: "Diagnose why this run failed, then fix it.",
- initialMessageFixOrigin: true,
- }),
- );
- // Live browser not ready: the fix seed queues (a user bubble appears) instead of sending.
- await waitFor(() =>
- expect(screen.getByText(/Diagnose why this run failed/i)).toBeTruthy(),
- );
- expect(postStreaming).not.toHaveBeenCalled();
-
- // Discard the queued fix seed via "New chat", then let the live browser become ready.
- await act(async () => {
- fireEvent.click(screen.getByRole("button", { name: /New chat/i }));
- });
- view.rerender(
- chatUi({
- workflowRunId: "wr_1",
- requiresLiveBrowser: true,
- isLiveBrowserReady: true,
- }),
- );
-
- // A normal typed turn after New chat must not inherit the discarded fix-origin signal.
- await submit("add a step that downloads the invoice");
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
- expect(streamCalls[0]?.body.fix_origin).toBe(false);
- });
-
- it("preserves fix_origin when a queued fix seed drains after the live browser connects", async () => {
- const view = render(
- chatUi({
- workflowRunId: "wr_1",
- requiresLiveBrowser: true,
- isLiveBrowserReady: false,
- initialMessage: "Diagnose why this run failed, then fix it.",
- initialMessageFixOrigin: true,
- }),
- );
- // Live browser not ready: the fix seed queues instead of sending.
- await waitFor(() =>
- expect(screen.getByText(/Diagnose why this run failed/i)).toBeTruthy(),
- );
- expect(postStreaming).not.toHaveBeenCalled();
-
- // Browser connects (session id present): the queued fix seed drains and
- // must still carry fix_origin. initialMessage is dropped so this is a pure
- // drain of the already-queued prompt, not a fresh seed.
- await act(async () => {
- view.rerender(
- chatUi({
- workflowRunId: "wr_1",
- requiresLiveBrowser: true,
- isLiveBrowserReady: true,
- liveBrowserSessionId: "bs_1",
- }),
- );
- });
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
- expect(streamCalls[0]?.body.fix_origin).toBe(true);
- });
-});
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runLifecycle.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runLifecycle.test.tsx
index 147ba416b..030a1dc81 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runLifecycle.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runLifecycle.test.tsx
@@ -16,7 +16,6 @@ import {
type StreamBody = {
message: string;
workflow_run_id?: string | null;
- fix_origin?: boolean;
};
type StreamCall = {
body: StreamBody;
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
index 69074bb47..67ea60803 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
@@ -80,7 +80,6 @@ import { ConfirmCard, shouldShowConfirmCard } from "./cards/ConfirmCard";
import { ConnectedAccountChoiceCard } from "./cards/ConnectedAccountChoiceCard";
import { connectedAccountChoiceLabel } from "./cards/connectedAccountChoiceLabel";
import { DiffCard, shouldShowDiffCard } from "./cards/DiffCard";
-import { FixCard, shouldShowFixCard } from "./cards/FixCard";
import { ReviewGateCard, getReviewGateVerdict } from "./cards/ReviewGateCard";
import { GoogleReconnectCard } from "./cards/GoogleReconnectCard";
import {
@@ -370,7 +369,7 @@ const getLatestDiffCardTurnId = (messages: ChatMessage[]): string | null => {
};
// messages.length - 1 with any trailing run_lifecycle lines skipped, so
-// proposal actions / FixCard keep attaching to the last real turn.
+// proposal actions keep attaching to the last real turn.
const findLastTurnIndex = (messages: ChatMessage[]): number => {
for (let index = messages.length - 1; index >= 0; index -= 1) {
if (messages[index]?.kind !== "run_lifecycle") {
@@ -399,9 +398,6 @@ type QueuedPrompt = {
content: string;
reason: QueuedPromptReason;
audioBlob?: Blob | null;
- // The one-shot fix-origin signal travels with the prompt it was seeded for, so
- // discarding the queue (new chat, history load, agent switch) drops it too.
- fixOrigin?: boolean;
idempotencyKey?: string;
};
@@ -626,8 +622,6 @@ interface WorkflowCopilotChatProps {
requiresLiveBrowser?: boolean;
isLiveBrowserReady?: boolean;
initialMessage?: string;
- // Sent as fix_origin only on the initial turn; does not propagate to subsequent turns.
- initialMessageFixOrigin?: boolean;
onInitialMessageConsumed?: () => void;
// Render as a docked panel (no float/drag/resize) instead of a floating window.
docked?: boolean;
@@ -706,7 +700,6 @@ export function WorkflowCopilotChat({
requiresLiveBrowser = false,
isLiveBrowserReady = false,
initialMessage,
- initialMessageFixOrigin,
onInitialMessageConsumed,
docked = false,
chromeless = false,
@@ -897,7 +890,6 @@ export function WorkflowCopilotChat({
content: string;
workflowPermanentId: string | undefined;
mode: "ask" | "build" | null;
- fixOrigin: boolean;
hadAudio: boolean;
hadBlockTarget: boolean;
browserSessionId: string | null;
@@ -1897,7 +1889,6 @@ export function WorkflowCopilotChat({
// Set by a block's "Generate" arm step so the next send scopes regeneration to that block.
const blockBuildTargetLabelRef = useRef<string | null>(null);
- const fixOriginPendingRef = useRef(false);
// True only while a block-build turn is actually in flight (not a turn it queued behind).
const blockGenInFlightRef = useRef(false);
@@ -1913,10 +1904,7 @@ export function WorkflowCopilotChat({
updateQueuedPrompt(null);
// Drop the queued block-build target so it doesn't leak into the next message.
- // The fix-origin signal rode on the discarded prompt; clear the ref too in case
- // a future path set it without queuing.
blockBuildTargetLabelRef.current = null;
- fixOriginPendingRef.current = false;
setMessages((prev) => prev.filter((message) => message.id !== queued.id));
// Text already in the composer is the newer intent — the user was part way
// through replacing the queued message — so it wins over what comes back.
@@ -2060,16 +2048,12 @@ export function WorkflowCopilotChat({
if (!queued) {
return;
}
- // New text, so the old prompt's framing must not ride along: the
- // fix-origin flag and the block-build scope both belonged to the
- // message being replaced.
+ // New text: the block-build scope belonged to the message being replaced.
blockBuildTargetLabelRef.current = null;
- fixOriginPendingRef.current = false;
updateQueuedPrompt({
...queued,
content: candidate,
audioBlob: messageAudioBlob,
- fixOrigin: false,
idempotencyKey: undefined,
});
setMessages((prev) =>
@@ -2089,18 +2073,11 @@ export function WorkflowCopilotChat({
const reason: QueuedPromptReason =
action === "queue_working" ? "working" : "live_browser";
const queuedId = options.queuedMessageId ?? crypto.randomUUID();
- // Move the pending fix-origin signal off the bare ref and onto the
- // queued prompt so a discard of the queue (new chat, history load)
- // can't leave it set to leak into the next, unrelated turn. The drain
- // restores it onto the ref before re-entering handleSend.
- const queuedFixOrigin = fixOriginPendingRef.current;
- fixOriginPendingRef.current = false;
updateQueuedPrompt({
id: queuedId,
content: candidate,
reason,
audioBlob: messageAudioBlob,
- fixOrigin: queuedFixOrigin,
idempotencyKey: options.idempotencyKey,
});
// First queue adds the user bubble; a re-queue (a working drain that
@@ -2160,13 +2137,12 @@ export function WorkflowCopilotChat({
}
setIsLoading(true);
inFlightRef.current = true;
- // Stamped here, before the awaits below consume messageAudioBlob,
- // fixOriginPendingRef and blockBuildTargetLabelRef.
+ // Stamped here, before the awaits below consume messageAudioBlob
+ // and blockBuildTargetLabelRef.
lastTurnRef.current = {
content: candidate,
workflowPermanentId,
mode: copilotV2Enabled ? composerMode : null,
- fixOrigin: fixOriginPendingRef.current,
hadAudio: messageAudioBlob !== null,
hadBlockTarget: blockBuildTargetLabelRef.current !== null,
browserSessionId: liveBrowserSessionId ?? null,
@@ -2466,10 +2442,6 @@ export function WorkflowCopilotChat({
}
};
- // Consume the one-shot fix-origin signal before any awaitable send step so a pre-stream
- // failure (e.g. getSseClient throwing) can't leave it set to leak into the next turn.
- const fixOrigin = fixOriginPendingRef.current;
- fixOriginPendingRef.current = false;
const client = await getSseClient(credentialGetter);
const targetBlockLabel = blockBuildTargetLabelRef.current;
blockBuildTargetLabelRef.current = null;
@@ -2480,7 +2452,6 @@ export function WorkflowCopilotChat({
// block Generate click room to arm the ref after the entry stamp.
if (lastTurnRef.current) {
lastTurnRef.current.hadBlockTarget = targetBlockLabel !== null;
- lastTurnRef.current.fixOrigin = fixOrigin;
}
await client.postStreaming<WorkflowCopilotSsePayload>(
"/workflow/copilot/chat-post",
@@ -2499,7 +2470,6 @@ export function WorkflowCopilotChat({
cancel_token: cancelToken,
idempotency_key: options.idempotencyKey ?? null,
target_block_label: targetBlockLabel,
- fix_origin: fixOrigin,
keep_pending_proposal:
copilotUxV1Enabled && Boolean(pendingProposalTurnId),
// Only opt in behind the flag; flag-off omits the field entirely so
@@ -2856,7 +2826,6 @@ export function WorkflowCopilotChat({
lastTurn?.workflowPermanentId === workflowPermanentId,
turnRequestMatches:
lastTurn?.mode === (copilotV2Enabled ? composerMode : null) &&
- lastTurn?.fixOrigin === Boolean(queuedPrompt.fixOrigin) &&
lastTurn?.hadAudio === false &&
lastTurn?.hadBlockTarget === false &&
lastTurn?.browserSessionId === (liveBrowserSessionId ?? null) &&
@@ -2884,9 +2853,6 @@ export function WorkflowCopilotChat({
// prompt that still needs the browser re-queues under the same id and
// drains via the live_browser path once the session arrives.
updateQueuedPrompt(null);
- // Restore the fix-origin signal the prompt carried so the drained turn
- // sends it; a re-queue (working → live_browser) re-captures it off the ref.
- fixOriginPendingRef.current = promptToSend.fixOrigin ?? false;
handleSend(promptToSend.content, {
queuedMessageId: promptToSend.id,
skipQueue: drainAction === "drain_skip_queue",
@@ -2933,16 +2899,12 @@ export function WorkflowCopilotChat({
// live browser isn't ready yet.
hasAutoSentRef.current = true;
onInitialMessageConsumedRef.current?.();
- if (initialMessageFixOrigin) {
- fixOriginPendingRef.current = true;
- }
handleSend(initialMessage).catch((error) => {
console.error("Auto-send failed:", error);
});
}, [
handleSend,
initialMessage,
- initialMessageFixOrigin,
isLoading,
isLoadingHistory,
queuedPrompt,
@@ -3572,19 +3534,6 @@ export function WorkflowCopilotChat({
}}
/>
) : null}
- {docked &&
- !isLoadingHistory &&
- isLastMessage &&
- shouldShowFixCard(message.narrative) ? (
- <FixCard
- turn={message.narrative}
- onFix={() =>
- handleSend(
- "The last run failed — diagnose the failure and fix it, then re-run.",
- )
- }
- />
- ) : null}
{(() => {
if (
isLoadingHistory ||
diff --git a/skyvern-frontend/src/routes/workflows/copilot/cards/FixCard.tsx b/skyvern-frontend/src/routes/workflows/copilot/cards/FixCard.tsx
deleted file mode 100644
index 56a9f37c9..000000000
--- a/skyvern-frontend/src/routes/workflows/copilot/cards/FixCard.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
-
-import { humanizeJudgeText, TurnNarrativeState } from "../narrativeState";
-
-// eslint-disable-next-line react-refresh/only-export-components
-export function shouldShowFixCard(turn: TurnNarrativeState): boolean {
- // Never offer to diagnose a run the user deliberately stopped; a cancel also
- // lands on terminal "error".
- if (turn.cancelled) {
- return false;
- }
- return (
- turn.terminal === "error" || turn.blocks.some((b) => b.state === "failed")
- );
-}
-
-function failedBlockError(turn: TurnNarrativeState): string | null {
- const failed = turn.blocks.find((b) => b.state === "failed");
- if (!failed) {
- return null;
- }
- const lastResult = [...failed.activity]
- .reverse()
- .find((e) => e.kind === "tool_result");
- return (
- lastResult?.text ??
- failed.activity[failed.activity.length - 1]?.text ??
- null
- );
-}
-
-type FixCardProps = {
- turn: TurnNarrativeState;
- onFix: () => void;
- onExplain?: () => void;
-};
-
-export function FixCard({ turn, onFix, onExplain }: FixCardProps) {
- const headline = humanizeJudgeText(
- turn.terminalMessage ??
- failedBlockError(turn) ??
- "The last run hit an error.",
- );
-
- return (
- <div className="rounded-lg border border-destructive/40 bg-destructive/10 p-3">
- <div className="flex items-center gap-2 text-sm font-semibold text-foreground">
- <ExclamationTriangleIcon className="h-4 w-4 text-destructive" />
- Run failed — here's a fix
- </div>
- <p className="mt-1 text-xs text-muted-foreground">{headline}</p>
- <div className="mt-2 flex flex-wrap gap-2">
- <button
- type="button"
- onClick={onFix}
- className="rounded-md bg-cta px-3 py-1 text-xs font-medium text-cta-foreground hover:bg-cta-hover"
- >
- Fix with Copilot
- </button>
- {onExplain ? (
- <button
- type="button"
- onClick={onExplain}
- className="rounded-md border border-border px-3 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground"
- >
- Explain
- </button>
- ) : null}
- </div>
- </div>
- );
-}
diff --git a/skyvern-frontend/src/routes/workflows/copilot/sendQueue.ts b/skyvern-frontend/src/routes/workflows/copilot/sendQueue.ts
index 03432a978..a25a1a4b7 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/sendQueue.ts
+++ b/skyvern-frontend/src/routes/workflows/copilot/sendQueue.ts
@@ -78,8 +78,8 @@ type ResolveDrainInput = {
turnOpeningContent: string | null;
turnCompletedNormally: boolean;
turnWorkflowMatches: boolean;
- // The chat-post carries more than the text (mode, fix origin, audio, block
- // target, browser session, code block); a queued send that differs on any of
+ // The chat-post carries more than the text (mode, audio, block target,
+ // browser session, code block); a queued send that differs on any of
// those is not a repeat. workflow_yaml, workflow_run_id and
// keep_pending_proposal are deliberately excluded: they track turn state the
// queued message was typed before, not what the user asked for.
diff --git a/skyvern-frontend/src/routes/workflows/copilot/workflowCopilotTypes.ts b/skyvern-frontend/src/routes/workflows/copilot/workflowCopilotTypes.ts
index 1acf49f84..ec46a67f3 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/workflowCopilotTypes.ts
+++ b/skyvern-frontend/src/routes/workflows/copilot/workflowCopilotTypes.ts
@@ -51,7 +51,6 @@ export interface WorkflowCopilotChatRequest {
cancel_token?: string;
idempotency_key?: string | null;
target_block_label?: string | null;
- fix_origin?: boolean;
keep_pending_proposal?: boolean;
// Opt-in: only clients that can render the credential_required frame set
// this, so the backend never pauses a turn a client would silently drop.
diff --git a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx
index bf6996d6a..6c185bc4f 100644
--- a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx
@@ -381,7 +381,6 @@ function Workspace({
const [searchParams] = useSearchParams();
const locationState = location.state as {
copilotMessage?: unknown;
- copilotFixOrigin?: unknown;
} | null;
const routeInitialCopilotMessage =
typeof locationState?.copilotMessage === "string"
@@ -396,7 +395,6 @@ function Workspace({
() => routeInitialCopilotMessage ?? storedInitialCopilotMessage,
[routeInitialCopilotMessage, storedInitialCopilotMessage],
);
- const initialCopilotFixOrigin = locationState?.copilotFixOrigin === true;
const handleInitialCopilotMessageConsumed = useCallback(() => {
if (!initialCopilotMessage) return;
clearStoredInitialCopilotMessage();
@@ -2877,7 +2875,6 @@ function Workspace({
requiresLiveBrowser={copilotRequiresLiveBrowser}
isLiveBrowserReady={copilotLiveBrowserReady}
initialMessage={initialCopilotMessage ?? undefined}
- initialMessageFixOrigin={initialCopilotFixOrigin}
onInitialMessageConsumed={handleInitialCopilotMessageConsumed}
onBlockSelect={(blockLabel) => {
const matches = (node: AppNode) =>
diff --git a/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx b/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx
index 5bb8ab919..1b9c63770 100644
--- a/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx
@@ -56,7 +56,7 @@ export function RunTab() {
// initialMessage), so the pane write can't race a separate
// state-only navigation.
openPane("copilot", {
- state: { copilotMessage: seedMessage, copilotFixOrigin: true },
+ state: { copilotMessage: seedMessage },
});
}
}
diff --git a/skyvern-frontend/src/routes/workflows/studio/StudioPaneToggles.test.tsx b/skyvern-frontend/src/routes/workflows/studio/StudioPaneToggles.test.tsx
index 3e7bac774..1f00e9ba1 100644
--- a/skyvern-frontend/src/routes/workflows/studio/StudioPaneToggles.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/StudioPaneToggles.test.tsx
@@ -359,7 +359,6 @@ describe("StudioPaneToggles run selector", () => {
);
renderInBrowser("/workflows/wpid_abc/studio?panes=copilot&wr=wr_other", {
copilotMessage: "Fix run A",
- copilotFixOrigin: true,
});
fireEvent.click(tab("Past Runs"));
diff --git a/skyvern/cli/core/artifacts.py b/skyvern/cli/core/artifacts.py
index 69adabde9..f174862cd 100644
--- a/skyvern/cli/core/artifacts.py
+++ b/skyvern/cli/core/artifacts.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import os
from datetime import datetime, timezone
from pathlib import Path
@@ -7,6 +8,9 @@ from .result import Artifact
def get_artifact_dir(session_id: str | None = None, run_id: str | None = None) -> Path:
+ override = os.environ.get("SKYVERN_MCP_ARTIFACT_DIR")
+ if override:
+ return Path(override).expanduser() / (session_id or run_id or "anonymous") / "screenshots"
base = Path.home() / ".skyvern" / "artifacts" / datetime.now(timezone.utc).strftime("%Y-%m-%d")
if session_id:
return base / session_id
diff --git a/skyvern/cli/mcp_tools/session.py b/skyvern/cli/mcp_tools/session.py
index a6f498a76..62f9fcea7 100644
--- a/skyvern/cli/mcp_tools/session.py
+++ b/skyvern/cli/mcp_tools/session.py
@@ -92,7 +92,7 @@ def _session_create_data(
async def skyvern_browser_session_create(
timeout: Annotated[
- int | None, Field(description=f"Session timeout in minutes (min {MIN_TIMEOUT}, capped at {MAX_TIMEOUT})")
+ int | None, Field(description=f"Session timeout in minutes (min {MIN_TIMEOUT}, max {MAX_TIMEOUT})")
] = DEFAULT_TIMEOUT,
proxy_location: Annotated[
str | dict[str, Any] | None,
diff --git a/skyvern/client/client.py b/skyvern/client/client.py
index 378463ca3..0ab99baa5 100644
--- a/skyvern/client/client.py
+++ b/skyvern/client/client.py
@@ -2152,7 +2152,7 @@ class Skyvern:
Optional URL to open when the standalone browser session starts.
timeout : typing.Optional[int]
- Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least 5; values above 240 are capped at 240. Defaults to 60.
+ Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60.
proxy_location : typing.Optional[CreateBrowserSessionRequestProxyLocation]
@@ -6298,7 +6298,7 @@ class AsyncSkyvern:
Optional URL to open when the standalone browser session starts.
timeout : typing.Optional[int]
- Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least 5; values above 240 are capped at 240. Defaults to 60.
+ Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60.
proxy_location : typing.Optional[CreateBrowserSessionRequestProxyLocation]
diff --git a/skyvern/client/raw_client.py b/skyvern/client/raw_client.py
index 393aaf332..e5577e954 100644
--- a/skyvern/client/raw_client.py
+++ b/skyvern/client/raw_client.py
@@ -3212,7 +3212,7 @@ class RawSkyvern:
Optional URL to open when the standalone browser session starts.
timeout : typing.Optional[int]
- Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least 5; values above 240 are capped at 240. Defaults to 60.
+ Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60.
proxy_location : typing.Optional[CreateBrowserSessionRequestProxyLocation]
@@ -8817,7 +8817,7 @@ class AsyncRawSkyvern:
Optional URL to open when the standalone browser session starts.
timeout : typing.Optional[int]
- Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least 5; values above 240 are capped at 240. Defaults to 60.
+ Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60.
proxy_location : typing.Optional[CreateBrowserSessionRequestProxyLocation]
diff --git a/skyvern/config.py b/skyvern/config.py
index aab007a92..c25de57a2 100644
--- a/skyvern/config.py
+++ b/skyvern/config.py
@@ -473,6 +473,9 @@ class Settings(BaseSettings):
ANTHROPIC_CUA_LLM_KEY: str = "ANTHROPIC_CLAUDE4.6_SONNET"
# Task V3 native engine (skyvern-3.0) model; empty falls back to LLM_KEY. Cloud pins the validated model.
TASK_V3_LLM_KEY: str = ""
+ # Forbid no-tool "narration" turns in the Task V3 loop. Only takes effect where the resolved
+ # model declares tool_choice support; the NO_TOOL_CALL_NUDGE fallback stays either way.
+ TASK_V3_TOOL_CHOICE_REQUIRED: bool = False
# VOLCENGINE (Doubao)
ENABLE_VOLCENGINE: bool = False
diff --git a/skyvern/constants.py b/skyvern/constants.py
index 079b9daca..e9ab26849 100644
--- a/skyvern/constants.py
+++ b/skyvern/constants.py
@@ -26,6 +26,7 @@ BROWSER_DOWNLOAD_TIMEOUT = 600 # 10 minute
DIALOG_LLM_TIMEOUT = 10 # 10 seconds
DOWNLOAD_FILE_PREFIX = "downloads"
SAVE_DOWNLOADED_FILES_TIMEOUT = 180
+SPECULATIVE_COST_PERSIST_DRAIN_TIMEOUT = 30
GET_DOWNLOADED_FILES_TIMEOUT = 30
NAVIGATION_MAX_RETRY_TIME = 5
PERMANENT_NAV_ERRORS = ("net::ERR_INVALID_URL",)
diff --git a/skyvern/forge/agent.py b/skyvern/forge/agent.py
index bad29b2c5..d05d7daa9 100644
--- a/skyvern/forge/agent.py
+++ b/skyvern/forge/agent.py
@@ -31,6 +31,7 @@ from skyvern.constants import (
SAVE_DOWNLOADED_FILES_TIMEOUT,
SCRAPE_TYPE_ORDER,
SPECIAL_FIELD_VERIFICATION_CODE,
+ SPECULATIVE_COST_PERSIST_DRAIN_TIMEOUT,
ScrapeType,
)
from skyvern.errors.errors import (
@@ -155,6 +156,7 @@ from skyvern.forge.validation_evidence_router import (
)
from skyvern.schemas.runs import CUA_ENGINES, RunEngine
from skyvern.schemas.steps import AgentStepOutput
+from skyvern.schemas.workflows import BlockType
from skyvern.services import run_service, service_utils
from skyvern.services.action_service import get_action_history
from skyvern.services.error_detection_service import detect_user_defined_errors_for_task
@@ -420,6 +422,31 @@ def _schedule_summary_shadow_check_for_hit(
)
+_PENDING_DISCARDED_PLAN_PERSISTS: set[asyncio.Task] = set()
+
+
+async def drain_speculative_persist_tasks(context: SkyvernContext | None) -> None:
+ if context is None or not context.pending_speculative_persist_tasks:
+ return
+ pending = context.pending_speculative_persist_tasks
+ context.pending_speculative_persist_tasks = []
+ try:
+ results = await asyncio.wait_for(
+ asyncio.gather(*pending, return_exceptions=True),
+ timeout=SPECULATIVE_COST_PERSIST_DRAIN_TIMEOUT,
+ )
+ for result in results:
+ if isinstance(result, BaseException) and not isinstance(result, asyncio.CancelledError):
+ LOG.warning("Speculative cost persistence task failed, cost may be unattributed", exc_info=result)
+ except TimeoutError:
+ # Bounded so a hung speculative call can't stall the run: we're back to losing
+ # the cost write, which is what happened on every path before the drain existed.
+ LOG.warning(
+ "Speculative cost persistence did not finish before clean-up, cost may be unattributed",
+ pending=len(pending),
+ )
+
+
def _discard_background_task_result(task: asyncio.Task) -> None:
# Retrieve the exception so asyncio does not warn about an unretrieved task failure.
if not task.cancelled():
@@ -570,6 +597,31 @@ async def _resolve_task_v3_llm_key(task: Task) -> str:
return override or settings.TASK_V3_LLM_KEY or settings.LLM_KEY
+_TASK_V3_SUPPORTED_BLOCK_TYPES = frozenset(
+ {
+ BlockType.TASK,
+ BlockType.NAVIGATION,
+ BlockType.LOGIN,
+ BlockType.ACTION,
+ BlockType.VALIDATION,
+ BlockType.EXTRACTION,
+ }
+)
+
+
+def _task_block_supports_v3(task_block: BaseTaskBlock) -> bool:
+ """Whether a workflow task block is eligible to dispatch to the Task V3 native engine.
+
+ v3 doesn't implement download-completion semantics yet, so a block relying on them
+ (complete_on_download / download_suffix / download_timeout) stays on the step engine.
+ """
+ if task_block.block_type not in _TASK_V3_SUPPORTED_BLOCK_TYPES:
+ return False
+ if task_block.complete_on_download or task_block.download_suffix or task_block.download_timeout is not None:
+ return False
+ return True
+
+
def _redact_extracted_information(value: Any, secret_values: set[str]) -> Any:
"""Scrub registered secrets from a (possibly deeply nested) extraction result.
@@ -961,6 +1013,7 @@ class ForgeAgent:
api_key: str | None,
close_browser_on_completion: bool,
browser_session_id: str | None,
+ task_block: BaseTaskBlock | None = None,
) -> tuple[Step, Task]:
"""Run a whole task via the native Task V3 tool-loop (one persistent conversation).
@@ -981,7 +1034,26 @@ class ForgeAgent:
taskv3_runaway_backstops,
)
- page = await browser_state.must_get_working_page()
+ # Workflow-block tasks re-resolve the live working page on every tool call, so a click that
+ # opens a new tab/popup is followed (mirrors the step engine's get_working_page re-fetch).
+ # Bare tasks keep today's exact semantics: one page grabbed up front, for the run's duration.
+ if task_block is not None:
+ # Fail fast (with the same recovery attempt bare tasks get) when the page is already
+ # gone at block start; mid-run losses surface through the per-call provider instead.
+ await browser_state.must_get_working_page()
+
+ async def _page_provider() -> Any:
+ # must_get (not get): recovers a crashed/closed page via _reopen_lost_working_page,
+ # matching the step engine's per-action re-acquisition; its raise on unrecoverable
+ # loss is contained by the loop's per-tool-call error handling.
+ return await browser_state.must_get_working_page()
+
+ else:
+ initial_page = await browser_state.must_get_working_page()
+
+ async def _page_provider() -> Any:
+ return initial_page
+
llm_caller = LLMCaller(llm_key=await _resolve_task_v3_llm_key(task))
parameters = coerce_v3_parameters(task.navigation_payload)
context = skyvern_context.current()
@@ -1009,12 +1081,88 @@ class ForgeAgent:
goal = (
f"{goal}\n\nIf this becomes true, stop and finish with status=terminated: {task.terminate_criterion}"
).strip()
+ page_free_validation = bool(
+ task_block is not None
+ and task.task_type == TaskType.validation
+ and context
+ and context.validation_without_page_information
+ )
+ if task_block is not None and task.task_type == TaskType.validation and not page_free_validation:
+ # Same evidence router v1 consults: a router-selected data-only validation goes
+ # page-free on v3 too. Conservative — any router error keeps the page-aware path.
+ try:
+ router_result = await resolve_validation_evidence_route(
+ task=task,
+ step=step,
+ complete_criterion=task.complete_criterion.strip() if task.complete_criterion else None,
+ terminate_criterion=task.terminate_criterion.strip() if task.terminate_criterion else None,
+ navigation_payload_str=json.dumps(parameters) if parameters else "{}",
+ error_code_mapping_str=json.dumps(task.error_code_mapping) if task.error_code_mapping else None,
+ local_datetime=datetime.now(context.tz_info if context else None).isoformat(),
+ )
+ page_free_validation = bool(router_result.effective_without_page_information)
+ except Exception:
+ LOG.warning("task_v3 validation evidence router failed; staying page-aware", task_id=task.task_id)
+ if task_block is not None and not page_free_validation:
+ # A block resumes mid-workflow: an earlier block may already have satisfied this one's
+ # criterion (the step engine's per-step goal check gives it this for free).
+ goal = (
+ f"{goal}\n\nThis task is one block of a larger workflow and starts mid-flow. First read "
+ "the full page text (get_html) and check whether the completion criterion is ALREADY "
+ "satisfied by the page's settled, loaded content - a loading indicator, skeleton, or "
+ "empty container does NOT satisfy a criterion about visible content."
+ + (
+ " When the goal names an action (open/click/submit), perform it unless the page "
+ "already shows that action's RESULT."
+ if task.task_type != TaskType.validation
+ else ""
+ )
+ + " If the criterion is genuinely satisfied, finish with status=completed "
+ "immediately without acting. Stay "
+ "within this block's goal: never sign out, navigate away from the current flow, or undo "
+ "prior progress unless the goal explicitly asks for it."
+ ).strip()
+ if page_free_validation:
+ # This mode judges only durable inputs/prior outputs; any perception instruction would
+ # contradict it, so it replaces (not extends) the read-the-page framing above.
+ goal = (
+ f"{goal}\n\nThis is a page-free assessment task: judge ONLY from the information already "
+ "provided above and prior workflow context. Do not call observe or get_html, and do not "
+ "modify page state. Evaluate the completion and termination criteria and finish with the "
+ "matching status."
+ ).strip()
+ elif task_block is not None and task.task_type == TaskType.validation:
+ # ValidationBlock tasks judge, not act; without this the loop can treat the criteria
+ # above as something to accomplish by interacting with the page.
+ goal = (
+ f"{goal}\n\nThis is an assessment task: do not modify page state. Evaluate the completion "
+ "and termination criteria above and finish with the matching status. Ground the judgment "
+ "in the page's actual content: read the full page text (get_html) before concluding, and "
+ "never finish with status=terminated on element summaries alone — absence must be "
+ "confirmed against the full text."
+ ).strip()
+ elif task_block is not None and task.task_type == TaskType.action:
+ goal = f"{goal}\n\nThis is a single, focused action: perform it and finish.".strip()
async def _should_cancel() -> bool:
refreshed = await app.DATABASE.tasks.get_task(
task_id=task.task_id, organization_id=organization.organization_id
)
- return bool(refreshed and refreshed.status == TaskStatus.canceled)
+ if refreshed and refreshed.status in (TaskStatus.canceled, TaskStatus.timed_out):
+ return True
+ # A workflow task also stops when its parent run is canceled or reaped to timed_out, not
+ # just the task row. Fail open on a lookup error: a DB blip must not fail a healthy run.
+ if task.workflow_run_id:
+ try:
+ workflow_run = await app.DATABASE.workflow_runs.get_workflow_run(
+ workflow_run_id=task.workflow_run_id, organization_id=organization.organization_id
+ )
+ except Exception:
+ LOG.warning("task_v3 cancel poll failed to read workflow run", task_id=task.task_id, exc_info=True)
+ return False
+ if workflow_run and workflow_run.status in (WorkflowRunStatus.canceled, WorkflowRunStatus.timed_out):
+ return True
+ return False
download_id = resolve_run_download_id(context, fallback_run_id=task.task_id)
# Honor a step cap (per-request override, task, or org, else the same MAX_STEPS_PER_RUN default
@@ -1028,25 +1176,67 @@ class ForgeAgent:
or organization.max_steps_per_run
or settings.MAX_STEPS_PER_RUN
)
- # Floor to the v3 minimum: a step-engine-tuned cap can starve the less round-efficient v3 loop.
- step_cap = max(step_cap, MIN_ACTION_STEPS)
+ if task_block is None:
+ # Floor to the v3 minimum: a step-engine-tuned cap can starve the less round-efficient v3
+ # loop. A block task keeps its configured budget as-is (workflow authors size it deliberately).
+ step_cap = max(step_cap, MIN_ACTION_STEPS)
+ if task_block is not None:
+ # The org's workflow-run-wide step ceiling binds v3 blocks too: an action round is the
+ # budget unit (round-stamped action rows make prior v3 rounds count exactly).
+ workflow_run_budget = await self._check_workflow_run_step_budget(organization, task)
+ if workflow_run_budget is not None:
+ total_workflow_run_steps, max_steps_per_workflow_run = workflow_run_budget
+ # The count already includes THIS block's freshly created Step(order=0), which has
+ # performed nothing yet — credit it back so a cap of N allows N actual rounds.
+ remaining_workflow_steps = max_steps_per_workflow_run - max(0, total_workflow_run_steps - 1)
+ if remaining_workflow_steps <= 0:
+ LOG.info(
+ "task_v3 block not started: workflow-run max steps reached",
+ task_id=task.task_id,
+ total_workflow_run_steps=total_workflow_run_steps,
+ max_steps_per_workflow_run=max_steps_per_workflow_run,
+ )
+ step = await self.update_step(step, status=StepStatus.failed, is_last=True)
+ task = await self.update_task(
+ task,
+ status=TaskStatus.failed,
+ failure_reason=f"Workflow run reached the maximum steps ({max_steps_per_workflow_run})",
+ )
+ await self.clean_up_task(
+ task=task,
+ last_step=step,
+ api_key=api_key,
+ need_call_webhook=True,
+ close_browser_on_completion=close_browser_on_completion,
+ browser_session_id=browser_session_id,
+ )
+ return step, task
+ step_cap = min(step_cap, remaining_workflow_steps)
max_turns, max_tool_calls = taskv3_runaway_backstops(step_cap)
- auth_tools, auth_guidance = build_auth_tools(task)
# Per-action persistence (parity with the step engine): the loop hands us each successful
# action round, and we persist one DB row per action + one screenshot per round, so the Task
# API's action_screenshot_urls and GET /tasks/{id}/actions are populated for v3. Additive and
# best-effort — billing still meters off outcome.billable_actions below.
_tool_action_types = {
"click": ActionType.CLICK,
+ "hover": ActionType.HOVER,
"type": ActionType.INPUT_TEXT,
"select_option": ActionType.SELECT_OPTION,
"select_combobox": ActionType.SELECT_OPTION,
"press_key": ActionType.KEYPRESS,
"file_upload": ActionType.UPLOAD_FILE,
+ "navigate": ActionType.GOTO_URL,
+ "scroll": ActionType.SCROLL,
+ "wait": ActionType.WAIT,
}
+ _billable_tool_names = frozenset(
+ {"click", "hover", "type", "select_option", "select_combobox", "press_key", "file_upload"}
+ )
v3_persisted_actions: list[Action] = []
+ v3_round_index = 0
- async def _on_action_round(round_actions: list[tuple[str, dict[str, Any]]]) -> None:
+ async def _on_action_round(round_actions: list[tuple[str, dict[str, Any], bool]]) -> None:
+ nonlocal v3_round_index
screenshot_artifact_id: str | None = None
try:
screenshot = await browser_state.take_post_action_screenshot(scrolling_number=0)
@@ -1055,17 +1245,19 @@ class ForgeAgent:
)
except Exception:
LOG.warning("task_v3 failed to capture post-action screenshot", task_id=task.task_id, exc_info=True)
- for name, args in round_actions:
+ for name, args, succeeded in round_actions:
try:
selector = args.get("selector", "") if isinstance(args, dict) else ""
action = Action(
action_type=_tool_action_types.get(name, ActionType.CLICK),
- status=ActionStatus.completed,
+ status=ActionStatus.completed if succeeded else ActionStatus.failed,
organization_id=task.organization_id,
workflow_run_id=task.workflow_run_id,
task_id=task.task_id,
step_id=step.step_id,
- step_order=step.order,
+ # Round index, not the single Step's order: makes each v3 action ROUND count
+ # as one unit of the workflow-run step budget (distinct (task, order) pairs).
+ step_order=v3_round_index,
action_order=len(v3_persisted_actions),
description=f"task_v3 {name} {selector}".strip(),
screenshot_artifact_id=screenshot_artifact_id,
@@ -1074,24 +1266,87 @@ class ForgeAgent:
await app.DATABASE.workflow_params.create_action(action=action)
except Exception:
LOG.warning("task_v3 failed to persist action row", task_id=task.task_id, exc_info=True)
+ if any(name in _billable_tool_names for name, _args, _ok in round_actions):
+ # Only billable rounds consume the budget unit; recordable-only rounds (navigate/
+ # scroll/wait) keep the current index so they never inflate the workflow-run count.
+ v3_round_index += 1
+
+ # Disambiguates multi-credential TOTP the way v1's action handler does (handler.py
+ # get_actual_value_of_parameter_if_secret), but resolved once per block instead of per keystroke:
+ # only an unambiguous single login credential is worth pinning for the whole loop.
+ credential_parameter_key: str | None = None
+ if task_block is not None:
+ login_credential_keys = [
+ parameter.key for parameter in task_block.parameters if parameter.parameter_type.is_login_credential()
+ ]
+ if len(login_credential_keys) == 1:
+ credential_parameter_key = login_credential_keys[0]
+
+ _settle_probe = None
+ if task_block is not None:
+ # Two cheap DOM-shape samples: unequal means the page is mid-render (a delayed data
+ # load) and a completion verdict would judge a transient shell. Shape (length+count)
+ # misses same-shape content swaps — fine for the delayed-population class. Peeks with the
+ # NON-recovering accessor — recovery at finish time could navigate and induce duplicate
+ # actions; a lost page settles (accept the verdict as-is). Total: errors settle.
+ # Fenced to block tasks so the live bare-task arm's finish path is unchanged.
+ async def _settle_probe() -> bool:
+ try:
+ peek = await browser_state.get_working_page()
+ if peek is None:
+ return True
+ probe_js = (
+ "() => document.body ? document.body.innerHTML.length + ':' + "
+ "document.querySelectorAll('*').length : '0'"
+ )
+ first = await peek.evaluate(probe_js)
+ await asyncio.sleep(0.7)
+ second = await peek.evaluate(probe_js)
+ return first == second
+ except Exception:
+ return True
- outcome = await run_task_v3_agent_loop(
- page=page,
- llm_caller=llm_caller,
- goal=goal,
- parameters=parameters,
- starting_url=task.url,
- downloads_dir=get_download_dir(download_id),
- organization_id=organization.organization_id,
- max_action_steps=step_cap,
- max_turns=max_turns,
- max_tool_calls=max_tool_calls,
- step=step,
- should_cancel=_should_cancel,
- on_action_round=_on_action_round,
- extra_tools=auth_tools,
- extra_system_guidance=auth_guidance,
- )
+ resolve_typed_text = None
+ if task_block is not None:
+ # Local import: handler.py transitively imports this module (agent registration), so a
+ # top-level import would be circular; matches this function's other lazy imports.
+ from skyvern.webeye.actions.handler import get_actual_value_of_parameter_if_secret_with_task
+
+ def resolve_typed_text(text: str) -> Any:
+ return get_actual_value_of_parameter_if_secret_with_task(task, text)
+
+ prev_active_credential_parameter_key = context.active_credential_parameter_key if context else None
+ if context and credential_parameter_key is not None:
+ context.active_credential_parameter_key = credential_parameter_key
+ try:
+ # Built AFTER the credential pin: the tool-offer gate (has_credential_totp_candidate)
+ # must see the pinned key, or a multi-credential context hides get_verification_code.
+ auth_tools, auth_guidance = build_auth_tools(task)
+ outcome = await run_task_v3_agent_loop(
+ page_provider=_page_provider,
+ resolve_typed_text=resolve_typed_text,
+ page_free=page_free_validation,
+ settle_probe=_settle_probe,
+ llm_caller=llm_caller,
+ goal=goal,
+ parameters=parameters,
+ starting_url=task.url,
+ downloads_dir=get_download_dir(download_id),
+ organization_id=organization.organization_id,
+ max_action_steps=step_cap,
+ max_turns=max_turns,
+ max_tool_calls=max_tool_calls,
+ step=step,
+ should_cancel=_should_cancel,
+ on_action_round=_on_action_round,
+ extra_tools=auth_tools,
+ extra_system_guidance="\n\n".join(
+ part for part in (auth_guidance, task.workflow_system_prompt) if part
+ ),
+ )
+ finally:
+ if context and credential_parameter_key is not None:
+ context.active_credential_parameter_key = prev_active_credential_parameter_key
LOG.info(
"Task V3 loop finished",
task_id=task.task_id,
@@ -1100,12 +1355,34 @@ class ForgeAgent:
tool_calls=outcome.tool_calls,
action_steps=outcome.action_steps,
)
+ completion_vetoed = False
+ if outcome.status == "completed":
+ # Same deployment gate the step engine applies before accepting a completion verdict
+ # (e.g. a submit block that must show a deterministic confirmation). The loop has already
+ # returned, so a veto fails safe instead of falsely completing.
+ try:
+ gate_page = await browser_state.get_working_page()
+ completion_vetoed = not await app.AGENT_FUNCTION.gate_step_completion(
+ task=task,
+ step=step,
+ task_block=task_block,
+ page=gate_page,
+ browser_state=browser_state,
+ )
+ except Exception:
+ LOG.warning(
+ "task_v3 completion gate errored; accepting completion", task_id=task.task_id, exc_info=True
+ )
+ if completion_vetoed:
+ LOG.info("task_v3 completion vetoed by completion gate", task_id=task.task_id)
status_map = {
"completed": TaskStatus.completed,
"terminated": TaskStatus.terminated,
"canceled": TaskStatus.canceled,
}
task_status = status_map.get(outcome.status, TaskStatus.failed)
+ if completion_vetoed:
+ task_status = TaskStatus.failed
# A completed run with a data-extraction goal must actually carry data. The model declaring
# completion with no extracted_output is a failed extraction, not an empty success — report it
# as failed rather than fabricate an empty object that reads as a successful-but-empty result.
@@ -1124,6 +1401,11 @@ class ForgeAgent:
step_status = StepStatus.completed
else:
step_status = StepStatus.failed
+ # This one step is the whole run's billing unit: a failure AFTER real page actions must still
+ # bill them (post-step billing only meters completed steps), so chargeable work completes the
+ # step even when the task fails. Canceled runs stay unbilled, matching the step engine.
+ if step_status == StepStatus.failed and outcome.billable_actions:
+ step_status = StepStatus.completed
extracted_information = outcome.extracted_output if completed else None
if completed and task.extracted_information_schema is not None and extracted_information is not None:
# Repair the model's output against the schema (fill missing required fields, drop
@@ -1178,23 +1460,66 @@ class ForgeAgent:
step_id=step.step_id,
exc_info=True,
)
+ failure_category = None
if task_status in (TaskStatus.completed, TaskStatus.canceled):
failure_reason = None
+ elif completion_vetoed:
+ failure_reason = "task_v3 reported completion but the deployment completion gate rejected it"
elif missing_extraction:
failure_reason = "task_v3 reported completion but returned no extracted_output for the data-extraction goal"
else:
failure_reason = outcome.reason or outcome.status
- task = await self.update_task(
- task,
- status=task_status,
- extracted_information=extracted_information,
- failure_reason=failure_reason,
- )
+ if task_status == TaskStatus.failed:
+ # Same code-level failure classification fail_task records, so v3 failures carry a
+ # failure_category like step-engine failures.
+ failure_category = classify_from_failure_reason(failure_reason, fallback_to_unknown=True)
+ if task.error_code_mapping and task_status in (TaskStatus.failed, TaskStatus.terminated):
+ # Same user-defined error detection the step engine runs on failure, so workflows that
+ # consume configured error codes keep that contract on v3.
+ try:
+ detected_errors = await detect_user_defined_errors_for_task(
+ task=task,
+ step=step,
+ browser_state=browser_state,
+ failure_reason=failure_reason,
+ )
+ if detected_errors:
+ await app.DATABASE.tasks.update_task(
+ task_id=task.task_id,
+ organization_id=task.organization_id,
+ errors=[error.model_dump() for error in detected_errors],
+ )
+ except Exception:
+ LOG.warning("task_v3 user-defined error detection failed", task_id=task.task_id, exc_info=True)
+ need_call_webhook = True
+ try:
+ task = await self.update_task(
+ task,
+ status=task_status,
+ extracted_information=extracted_information,
+ failure_reason=failure_reason,
+ failure_category=failure_category,
+ )
+ except (TaskAlreadyTimeout, TaskAlreadyCanceled) as finalized:
+ # A reaper or cancel API finalized the row while the loop was stopping; that terminal
+ # status wins — keep it rather than routing this run through the failure path. The cancel
+ # API already webhooks synchronously, so suppress the duplicate there (v1 parity on both axes).
+ need_call_webhook = not isinstance(finalized, TaskAlreadyCanceled)
+ LOG.info(
+ "task_v3 task already finalized externally; keeping the existing terminal status",
+ task_id=task.task_id,
+ attempted_status=task_status,
+ )
+ refreshed = await app.DATABASE.tasks.get_task(
+ task_id=task.task_id, organization_id=organization.organization_id
+ )
+ if refreshed:
+ task = refreshed
await self.clean_up_task(
task=task,
last_step=step,
api_key=api_key,
- need_call_webhook=True,
+ need_call_webhook=need_call_webhook,
close_browser_on_completion=close_browser_on_completion,
browser_session_id=browser_session_id,
)
@@ -1378,16 +1703,26 @@ class ForgeAgent:
)
return step, detailed_output, None
+ # A bare task always qualifies; a workflow block must be an allowed type with no
+ # download semantics (v3 doesn't implement complete_on_download/download_suffix).
+ task_block_supports_v3 = task_block is None or _task_block_supports_v3(task_block)
+ if engine == RunEngine.skyvern_v3 and task_block is not None and not task_block_supports_v3:
+ LOG.info(
+ "Task V3 block type unsupported; falling back to the step engine",
+ task_id=task.task_id,
+ block_label=task_block.label,
+ block_type=task_block.block_type,
+ reason="taskv3_unsupported_block",
+ )
+
# Task V3 native engine: run the whole task as one persistent tool-loop and
# complete here. Returns next_step=None, so neither retry nor execute-all-steps
# recursion re-invokes the loop. DISABLE_TASK_V3 falls through to the step engine.
if (
engine == RunEngine.skyvern_v3
- # v3 does not yet preserve workflow download_suffix/complete_on_download, so a
- # workflow task block falls through to the step engine until that is supported.
- and task_block is None
- # v3 has no 2FA/TOTP handling yet; fall back to the step engine when a TOTP
- # verification URL is set. A bare totp_identifier proceeds on v3 (rarely exercises 2FA).
+ and task_block_supports_v3
+ # v3 now resolves TOTP via get_verification_code; only a totp_verification_url task
+ # (needs step-engine webhook delivery) stays excluded on that axis.
and not task.totp_verification_url
and not await app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached(
"DISABLE_TASK_V3",
@@ -1404,6 +1739,7 @@ class ForgeAgent:
api_key=api_key,
close_browser_on_completion=close_browser_on_completion,
browser_session_id=browser_session_id,
+ task_block=task_block,
)
finally:
await app.ARTIFACT_MANAGER.flush_step_archive(step.step_id)
@@ -1957,6 +2293,11 @@ class ForgeAgent:
"Task is already canceled. Can't fail the task.",
)
return False
+ except TaskAlreadyTimeout:
+ LOG.info(
+ "Task is already timed out. Can't fail the task.",
+ )
+ return False
except InvalidTaskStatusTransition:
LOG.warning(
"Invalid task status transition while failing a task",
@@ -5548,6 +5889,10 @@ class ForgeAgent:
workflow_run_id=task.workflow_run_id,
)
+ # Last point common to every terminal path, and late enough that the screenshot and
+ # download work above has already given the billed speculative call time to land.
+ await drain_speculative_persist_tasks(skyvern_context.current())
+
# if it's a task block from workflow run,
# we don't need to close the browser, save browser artifacts, or call webhook
if task.workflow_run_id:
@@ -5902,14 +6247,17 @@ class ForgeAgent:
continue
redaction_enabled = app.WORKFLOW_CONTEXT_MANAGER.artifact_redaction_enabled(task.workflow_run_id)
+ # Opted-out runs still floor runtime-resolved secrets (e.g. verification codes) out of
+ # browser diagnostics, matching the workflow-finalization sites.
secret_values = (
app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run(task.workflow_run_id)
if redaction_enabled
- else set()
+ else app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts()
)
+ should_redact = redaction_enabled or bool(secret_values)
har_data = await app.BROWSER_MANAGER.get_har_data(task_id=task.task_id, browser_state=browser_state)
- if redaction_enabled:
+ if should_redact:
har_data = await asyncio.to_thread(redact_har_bytes, har_data, secret_values)
if settings.SKYVERN_SUBMISSION_SIGNAL_SHADOW:
submission_shadow.schedule_submission_signal_shadow(
@@ -5924,7 +6272,7 @@ class ForgeAgent:
browser_log = await app.BROWSER_MANAGER.get_browser_console_log(
task_id=task.task_id, browser_state=browser_state
)
- if redaction_enabled:
+ if should_redact:
browser_log = await asyncio.to_thread(redact_console_log_bytes, browser_log, secret_values)
LOG.debug("Uploading browser log", browser_log_size=len(browser_log))
@@ -6146,13 +6494,22 @@ class ForgeAgent:
complete_action = None
if complete_action is not None:
- asyncio.create_task(
+ persist_task = asyncio.create_task(
self._persist_speculative_metadata_for_discarded_plan(
next_step,
speculative_task,
cancel_step=True,
- )
+ ),
+ name=f"persist_discarded_plan_{next_step.step_id}",
)
+ # The speculative call is already billed, so its cost write has to outlive this
+ # branch. The module-level set keeps a strong reference (an unreferenced task can be
+ # garbage collected mid-flight); the context registration is what clean_up_task
+ # drains so the write also survives run teardown.
+ _PENDING_DISCARDED_PLAN_PERSISTS.add(persist_task)
+ persist_task.add_done_callback(_PENDING_DISCARDED_PLAN_PERSISTS.discard)
+ if context := skyvern_context.current():
+ context.pending_speculative_persist_tasks.append(persist_task)
working_page = page or await browser_state.must_get_working_page()
@@ -6838,7 +7195,7 @@ class ForgeAgent:
task_ids = [t.task_id for t in workflow_run_tasks]
if not task_ids:
return 0, organization.max_steps_per_workflow_run
- total_steps = await app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids(
+ total_steps = await app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids(
task_ids=task_ids,
organization_id=organization.organization_id,
)
diff --git a/skyvern/forge/prompts/skyvern/workflow-copilot-agent.j2 b/skyvern/forge/prompts/skyvern/workflow-copilot-agent.j2
index f3689ec8a..a15b5b0c6 100644
--- a/skyvern/forge/prompts/skyvern/workflow-copilot-agent.j2
+++ b/skyvern/forge/prompts/skyvern/workflow-copilot-agent.j2
@@ -96,7 +96,7 @@ CRITICAL RULES WHEN USING DIRECT BROWSER TOOLS:
- If you call navigate_browser, you MUST call at least one observation tool (evaluate, get_browser_screenshot, click, type_text, scroll, select_option, press_key, or console_messages) before responding.
- NEVER answer questions about page content, link counts, link targets, or page structure from memory or training data. Use evaluate or get_browser_screenshot.
- Use evaluate for reading/inspection; do NOT use evaluate to click or type. Use click and type_text for interactions.
-- Prefer locator reads in persisted `code` blocks: `page.locator(...)`, `page.get_by_role(...)`, and methods such as `inner_text`, `text_content`, `get_attribute`, `count`, `is_visible`. Locators auto-wait; `page.evaluate` does not, so a raw evaluate that worked while you were looking at the page can run too early on replay. `page.evaluate` is permitted when you are replaying an expression you already proved on this page and no locator read expresses it; `page.evaluate_handle`, `page.request`, and `page.context` remain unavailable.
+- Prefer locator reads in persisted `code` blocks: `page.locator(...)`, `page.get_by_role(...)`, and methods such as `inner_text`, `text_content`, `get_attribute`, `count`, `is_visible`. Locators auto-wait; `page.evaluate` does not, so a raw evaluate that worked while you were looking at the page can run too early on replay. `page.evaluate` is permitted when you are replaying an expression you already proved on this page and no locator read expresses it; `page.evaluate_handle`, `page.request`, and `page.context` remain unavailable. Address the content you are reading: when the value you need is text on the page, target the element that carries it — `get_by_text`, `get_by_role`, or a selector you verified on this page — rather than reading the whole document and scanning the result. You saw the rendered page while scouting, so you can name that text. Reading `body`/`html`/`:root` is a last resort: it makes the block depend on unrelated page copy, and the readiness wait that precedes it then has no real precondition to encode.
- CSS SELECTORS: interactions target elements by CSS selector, which is instant and deterministic. The selectors reported by page inspection are verified to match exactly one element, so prefer copying one of those over composing your own. When a shared class matches many elements (e.g. one Add-to-Cart per result row), scope the selector to the specific item (its container, a unique attribute, or `:nth-of-type`). If a selector does not resolve or the action fails, observe the page again — with `evaluate`, `inspect_page_for_composition`, or `get_browser_screenshot`, whichever answers the question — and derive a better selector. jQuery pseudo-selectors (:contains(), :eq(), :first, :visible, :has()) are NOT valid — use standard selectors like 'button.classname', 'a[href*="keyword"]', '#id', 'tr:nth-of-type(2) td a'.
- SCROLL: Use scroll to reveal content below the fold. Provide direction (up/down/left/right) and optionally amount in pixels, a selector for the scrollable container, or an intent to scroll a specific element into view.
- SELECT_OPTION: Use select_option for <select> dropdowns. Provide the value and a selector to target the element. For free-text inputs, use type_text instead.
diff --git a/skyvern/forge/sdk/api/llm/api_handler_factory.py b/skyvern/forge/sdk/api/llm/api_handler_factory.py
index 8aa2e6912..957bfb34c 100644
--- a/skyvern/forge/sdk/api/llm/api_handler_factory.py
+++ b/skyvern/forge/sdk/api/llm/api_handler_factory.py
@@ -15,7 +15,10 @@ from anthropic import NOT_GIVEN
from anthropic.types.beta.beta_message import BetaMessage as AnthropicMessage
from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler
from litellm.types.router import AllowedFailsPolicy
-from litellm.utils import CustomStreamWrapper, ModelResponse
+
+# supports_tool_choice is not re-exported on the litellm module, whose __getattr__ raises for
+# un-exported names — reading it as litellm.supports_tool_choice would AttributeError.
+from litellm.utils import CustomStreamWrapper, ModelResponse, supports_tool_choice
from openai import APIError, AsyncOpenAI, RateLimitError
from openai.types.chat.chat_completion_chunk import ChatCompletionChunk
from opentelemetry import trace as otel_trace
@@ -3027,6 +3030,8 @@ class LLMCaller:
self.screenshot_resize_target_dimension = get_resize_target_dimension(self.browser_window_dimension)
self.openai_client = None
+ self._supports_tool_choice: bool | None = None
+ self._warned_unsupported_tool_choice = False
openrouter_model_name = LLMAPIHandlerFactory._openrouter_model_name(self.llm_key, self.llm_config)
self._custom_openrouter = bool(openrouter_model_name and is_custom_llm_key(self.original_llm_key))
# openrouter/ keys always resolve to LLMConfig, never LLMRouterConfig
@@ -3063,6 +3068,50 @@ class LLMCaller:
def clear_tool_results(self) -> None:
self.current_tool_results = []
+ def supports_tool_choice(self) -> bool:
+ """Whether the resolved model can be sent a ``tool_choice`` parameter.
+
+ Default-deny: an unrecognized model answers False. Router configs answer for their
+ deployments rather than the group name — litellm knows nothing about a router group, so
+ asking about ``model_name`` would deny every router config.
+ """
+ if self._supports_tool_choice is not None:
+ return self._supports_tool_choice
+ self._supports_tool_choice = self._resolve_tool_choice_support()
+ return self._supports_tool_choice
+
+ def _resolve_tool_choice_support(self) -> bool:
+ # Mirrors the branch order in _dispatch_llm_call. These paths build their provider kwargs
+ # from an explicit allowlist with no tool_choice entry, so the parameter cannot reach the
+ # provider however the model is set.
+ if self.openai_client is not None or self._custom_openrouter:
+ return False
+ try:
+ if isinstance(self.llm_config, LLMRouterConfig):
+ groups = {self.llm_config.main_model_group}
+ fallback_group = self.llm_config.fallback_model_group
+ if isinstance(fallback_group, str):
+ groups.add(fallback_group)
+ elif fallback_group:
+ groups.update(fallback_group)
+ deployments = [
+ deployment for deployment in self.llm_config.model_list if deployment.model_name in groups
+ ]
+ if not deployments:
+ return False
+ return all(
+ supports_tool_choice(model=str(deployment.litellm_params.get("model") or ""))
+ for deployment in deployments
+ )
+ # Router configs reach the provider through litellm.Router and never these branches, so
+ # this check has to sit below the router case exactly as it does in dispatch.
+ if any(marker in (self.llm_key or "") for marker in ("ANTHROPIC", "UI_TARS", "YUTORI")):
+ return False
+ return supports_tool_choice(model=self.llm_config.model_name)
+ except Exception:
+ LOG.debug("Failed to resolve tool_choice support", llm_key=self.llm_key, exc_info=True)
+ return False
+
@traced(name=LLM_REQUEST_SPAN_NAME)
async def call(
self,
@@ -3104,6 +3153,18 @@ class LLMCaller:
# Router configs carry per-deployment litellm_params inside the Router, not on the config.
if not isinstance(self.llm_config, LLMRouterConfig) and self.llm_config.litellm_params:
active_parameters.update(self.llm_config.litellm_params)
+ if "tool_choice" in active_parameters and not self.supports_tool_choice():
+ # Forwarding it to a provider that rejects it is the one way this parameter breaks a
+ # call rather than merely failing to help, so drop it here instead of at each caller.
+ unsupported_tool_choice = active_parameters.pop("tool_choice")
+ if not self._warned_unsupported_tool_choice:
+ self._warned_unsupported_tool_choice = True
+ LOG.warning(
+ "Dropping tool_choice the resolved model does not support",
+ llm_key=self.llm_key,
+ model=self.llm_config.model_name,
+ tool_choice=unsupported_tool_choice,
+ )
context = skyvern_context.current()
secret_values = _current_secret_values_for_redaction()
diff --git a/skyvern/forge/sdk/artifact/manager.py b/skyvern/forge/sdk/artifact/manager.py
index f3a6b22fe..21e95521d 100644
--- a/skyvern/forge/sdk/artifact/manager.py
+++ b/skyvern/forge/sdk/artifact/manager.py
@@ -104,8 +104,15 @@ def _maybe_redact_artifact_data(artifact_type: ArtifactType, data: bytes, workfl
context = skyvern_context.current()
resolved_workflow_run_id = workflow_run_id or (context.workflow_run_id if context else None)
if not app.WORKFLOW_CONTEXT_MANAGER.artifact_redaction_enabled(resolved_workflow_run_id):
- return data
- secret_values = app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run(resolved_workflow_run_id)
+ # Runtime-resolved secrets (e.g. verification codes) still redact from browser
+ # diagnostics under the global switch alone, matching the workflow-finalization floor.
+ if artifact_type not in (ArtifactType.HAR, ArtifactType.BROWSER_CONSOLE_LOG):
+ return data
+ secret_values = app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts()
+ if not secret_values:
+ return data
+ else:
+ secret_values = app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run(resolved_workflow_run_id)
except Exception:
return data
if artifact_type == ArtifactType.HAR:
@@ -1931,6 +1938,9 @@ class ArtifactManager:
resolved_run_id = run_id or (context.run_id if context else None)
if not _bundling_enabled():
for _, (artifact_type, data) in entries.items():
+ # Callers redact before archiving, but route through the gate anyway (idempotent) so
+ # no archive path can persist an unredacted browser diagnostic.
+ data = _maybe_redact_artifact_data(artifact_type, data, resolved_workflow_run_id)
artifact_id = generate_artifact_id()
uri = app.STORAGE.build_uri(
organization_id=step.organization_id,
diff --git a/skyvern/forge/sdk/copilot/agent.py b/skyvern/forge/sdk/copilot/agent.py
index 9c47db6c0..652738863 100644
--- a/skyvern/forge/sdk/copilot/agent.py
+++ b/skyvern/forge/sdk/copilot/agent.py
@@ -288,7 +288,6 @@ class RequestPolicyGuardrailInputs:
workflow_permanent_id: str | None = None
workflow_run_id: str | None = None
browser_session_id: str | None = None
- fix_origin: bool = False
persisted_workflow_yaml: str | None = None
selected_connected_account_id: str | None = None
stored_completion_criteria: StoredCriteriaSnapshot | None = None
@@ -4144,7 +4143,6 @@ async def _run_copilot_turn_impl(
workflow_permanent_id=chat_request.workflow_permanent_id,
workflow_run_id=getattr(chat_request, "workflow_run_id", None),
browser_session_id=getattr(chat_request, "browser_session_id", None),
- fix_origin=getattr(chat_request, "fix_origin", False),
persisted_workflow_yaml=persisted_workflow_yaml,
selected_connected_account_id=selected_connected_account_id(prior_turn_outcome, chat_request.message),
stored_completion_criteria=stored_completion_criteria,
diff --git a/skyvern/forge/sdk/copilot/code_block_preflight.py b/skyvern/forge/sdk/copilot/code_block_preflight.py
index 2a373be41..40b87cb8c 100644
--- a/skyvern/forge/sdk/copilot/code_block_preflight.py
+++ b/skyvern/forge/sdk/copilot/code_block_preflight.py
@@ -12,13 +12,14 @@ from dataclasses import dataclass
from functools import cache
from pathlib import Path
from types import SimpleNamespace
-from typing import Iterable, Iterator, Mapping
+from typing import Callable, Iterable, Iterator, Mapping
from jinja2 import StrictUndefined, TemplateSyntaxError, UndefinedError
from jinja2.exceptions import SecurityError
from jinja2.sandbox import SandboxedEnvironment
from skyvern.forge.sdk.copilot.code_block_security import CodeBlockSecurityError, author_time_code_security_errors
+from skyvern.forge.sdk.copilot.code_block_synthesis import is_root_locator_selector
from skyvern.forge.sdk.workflow.models._jinja import _json_finalize, _json_type_filter
from skyvern.forge.sdk.workflow.models.block import CodeBlock
from skyvern.utils.templating import get_missing_variables
@@ -191,7 +192,7 @@ _BROAD_TABLE_SELECTOR_METHODS = frozenset(("locator", "query_selector", "query_s
_LONE_LIST_ITEM_SELECTOR_EXEMPTION = frozenset({"li"})
_GET_BY_TEXT_NARROWING_ATTRIBUTES = frozenset({"first", "last"})
_GET_BY_TEXT_NARROWING_METHODS = frozenset({"filter", "first", "last", "nth"})
-_TABLE_WAIT_NARROWING_METHODS = frozenset(
+_LOCATOR_NARROWING_METHODS = frozenset(
{
"filter",
"get_by_alt_text",
@@ -205,6 +206,15 @@ _TABLE_WAIT_NARROWING_METHODS = frozenset(
"nth",
}
)
+# `nth` cannot narrow a root container to anything smaller, so it does not count as narrowing on a
+# root chain even though it does on an ordinary multi-match locator.
+_ROOT_NARROWING_METHODS = _LOCATOR_NARROWING_METHODS - {"nth"}
+_READINESS_WAIT_STATES = frozenset({"visible", "attached"})
+_READINESS_EXPECTATION_METHODS = frozenset({"to_be_attached", "to_be_visible"})
+# Advisory diagnostics reach the model as guidance only; keeping them out of the preflight
+# gate is what stops `skyvern_code_block_lint` from turning advice into a rejection.
+_ADVISORY_DIAGNOSTIC_CODES = frozenset({"ROOT_CONTAINER_READINESS_WAIT", "ROOT_CONTAINER_TEXT_READ"})
+_WHOLE_PAGE_READ_METHODS = frozenset({"inner_text", "text_content", "all_inner_texts", "all_text_contents"})
_TABLE_ROW_TAG_SELECTOR_RE = re.compile(r"(?<![a-z0-9_-])tr(?![a-z0-9_-])")
_TABLE_ROW_ROLE_SELECTOR_RE = re.compile(r"\[role\s*=\s*(['\"]?)row\1\]")
@@ -422,6 +432,14 @@ def author_time_code_block_diagnostics(code: str) -> list[CodeBlockPreflightDiag
return [*_author_time_security_diagnostics(code), *_author_time_ast_diagnostics(tree)]
+def advisory_code_block_diagnostics(code: str) -> list[CodeBlockPreflightDiagnostic]:
+ return [
+ diagnostic
+ for diagnostic in author_time_code_block_diagnostics(code)
+ if diagnostic.code in _ADVISORY_DIAGNOSTIC_CODES
+ ]
+
+
def _static_ast_diagnostics(code: str) -> list[CodeBlockPreflightDiagnostic]:
tree, syntax_error = _parse_static_ast(code)
if syntax_error is not None:
@@ -429,7 +447,14 @@ def _static_ast_diagnostics(code: str) -> list[CodeBlockPreflightDiagnostic]:
if tree is None:
return []
- diagnostics = [*_author_time_security_diagnostics(code), *_author_time_ast_diagnostics(tree)]
+ diagnostics = [
+ *_author_time_security_diagnostics(code),
+ *(
+ diagnostic
+ for diagnostic in _author_time_ast_diagnostics(tree)
+ if diagnostic.code not in _ADVISORY_DIAGNOSTIC_CODES
+ ),
+ ]
for node in ast.walk(tree):
if not isinstance(node, ast.Call):
continue
@@ -492,7 +517,7 @@ def _author_time_ast_diagnostics(tree: ast.AST) -> list[CodeBlockPreflightDiagno
def _alias_wait_diagnostics(tree: ast.AST) -> list[CodeBlockPreflightDiagnostic]:
diagnostics: list[CodeBlockPreflightDiagnostic] = []
statements = [node for node in ast.iter_child_nodes(tree) if isinstance(node, ast.stmt)]
- _alias_wait_block_diagnostics(statements, {}, {}, diagnostics)
+ _alias_wait_block_diagnostics(statements, {}, {}, {}, diagnostics)
return diagnostics
@@ -500,37 +525,44 @@ def _alias_wait_block_diagnostics(
statements: list[ast.stmt],
text_aliases: dict[str, bool],
table_aliases: dict[str, bool],
+ root_aliases: dict[str, bool],
diagnostics: list[CodeBlockPreflightDiagnostic],
) -> None:
for statement in statements:
- _alias_wait_statement_diagnostics(statement, text_aliases, table_aliases, diagnostics)
+ _alias_wait_statement_diagnostics(statement, text_aliases, table_aliases, root_aliases, diagnostics)
def _alias_wait_statement_diagnostics(
node: ast.stmt,
text_aliases: dict[str, bool],
table_aliases: dict[str, bool],
+ root_aliases: dict[str, bool],
diagnostics: list[CodeBlockPreflightDiagnostic],
) -> None:
if isinstance(node, (ast.Assign, ast.AnnAssign)):
assigned_value, _targets = _assignment_value_and_targets(node)
if assigned_value is not None:
- _alias_wait_expr_diagnostics(assigned_value, text_aliases, table_aliases, diagnostics)
+ _alias_wait_expr_diagnostics(assigned_value, text_aliases, table_aliases, root_aliases, diagnostics)
_update_global_get_by_text_aliases(node, text_aliases)
_update_global_table_locator_aliases(node, table_aliases)
+ _update_root_locator_aliases(node, root_aliases)
return
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):
for decorator in node.decorator_list:
- _alias_wait_expr_diagnostics(decorator, text_aliases, table_aliases, diagnostics)
- _alias_wait_block_diagnostics(list(node.body), dict(text_aliases), dict(table_aliases), diagnostics)
+ _alias_wait_expr_diagnostics(decorator, text_aliases, table_aliases, root_aliases, diagnostics)
+ _alias_wait_block_diagnostics(
+ list(node.body), dict(text_aliases), dict(table_aliases), dict(root_aliases), diagnostics
+ )
return
for child in ast.iter_child_nodes(node):
if isinstance(child, ast.expr):
- _alias_wait_expr_diagnostics(child, text_aliases, table_aliases, diagnostics)
+ _alias_wait_expr_diagnostics(child, text_aliases, table_aliases, root_aliases, diagnostics)
for child_statements in _alias_wait_child_statement_blocks(node):
- _alias_wait_block_diagnostics(child_statements, dict(text_aliases), dict(table_aliases), diagnostics)
+ _alias_wait_block_diagnostics(
+ child_statements, dict(text_aliases), dict(table_aliases), dict(root_aliases), diagnostics
+ )
def _alias_wait_child_statement_blocks(node: ast.stmt) -> list[list[ast.stmt]]:
@@ -549,6 +581,7 @@ def _alias_wait_expr_diagnostics(
node: ast.expr,
text_aliases: Mapping[str, bool],
table_aliases: Mapping[str, bool],
+ root_aliases: Mapping[str, bool],
diagnostics: list[CodeBlockPreflightDiagnostic],
) -> None:
for child in ast.walk(node):
@@ -563,6 +596,12 @@ def _alias_wait_expr_diagnostics(
global_table_wait_diagnostic = _global_table_wait_for_diagnostic(child, table_aliases)
if global_table_wait_diagnostic is not None:
diagnostics.append(global_table_wait_diagnostic)
+ root_readiness_diagnostic = _root_readiness_wait_diagnostic(child, root_aliases)
+ if root_readiness_diagnostic is not None:
+ diagnostics.append(root_readiness_diagnostic)
+ root_read_diagnostic = _root_container_text_read_diagnostic(child, root_aliases)
+ if root_read_diagnostic is not None:
+ diagnostics.append(root_read_diagnostic)
def _update_global_get_by_text_aliases(node: ast.Assign | ast.AnnAssign, aliases: dict[str, bool]) -> None:
@@ -579,13 +618,28 @@ def _update_global_get_by_text_aliases(node: ast.Assign | ast.AnnAssign, aliases
def _update_global_table_locator_aliases(node: ast.Assign | ast.AnnAssign, aliases: dict[str, bool]) -> None:
+ _update_selector_locator_aliases(node, aliases, _is_table_locator_selector, _LOCATOR_NARROWING_METHODS)
+
+
+def _update_root_locator_aliases(node: ast.Assign | ast.AnnAssign, aliases: dict[str, bool]) -> None:
+ _update_selector_locator_aliases(node, aliases, is_root_locator_selector, _ROOT_NARROWING_METHODS)
+
+
+def _update_selector_locator_aliases(
+ node: ast.Assign | ast.AnnAssign,
+ aliases: dict[str, bool],
+ matches_selector: Callable[[str], bool],
+ narrowing_methods: frozenset[str],
+) -> None:
assigned_value, targets = _assignment_value_and_targets(node)
if assigned_value is None:
return
- is_global_table_locator, has_narrowing = _global_table_locator_chain(assigned_value, aliases)
+ is_selector_rooted, has_narrowing = _global_selector_locator_chain(
+ assigned_value, aliases, matches_selector, narrowing_methods
+ )
for target in targets:
if isinstance(target, ast.Name):
- if is_global_table_locator:
+ if is_selector_rooted:
aliases[target.id] = has_narrowing
else:
aliases.pop(target.id, None)
@@ -696,22 +750,41 @@ def _global_table_wait_for_diagnostic(
)
+def _is_table_locator_selector(selector: str) -> bool:
+ return selector.strip().casefold() == "table"
+
+
def _global_table_locator_chain(node: ast.expr, aliases: Mapping[str, bool]) -> tuple[bool, bool]:
- if _is_global_page_table_locator_call(node):
+ return _global_selector_locator_chain(node, aliases, _is_table_locator_selector, _LOCATOR_NARROWING_METHODS)
+
+
+def _global_root_locator_chain(node: ast.expr, aliases: Mapping[str, bool]) -> tuple[bool, bool]:
+ return _global_selector_locator_chain(node, aliases, is_root_locator_selector, _ROOT_NARROWING_METHODS)
+
+
+def _global_selector_locator_chain(
+ node: ast.expr,
+ aliases: Mapping[str, bool],
+ matches_selector: Callable[[str], bool],
+ narrowing_methods: frozenset[str],
+) -> tuple[bool, bool]:
+ if _is_global_page_selector_locator_call(node, matches_selector):
return True, False
if isinstance(node, ast.Name) and node.id in aliases:
return True, aliases[node.id]
if isinstance(node, ast.Attribute):
- return _global_table_locator_chain(node.value, aliases)
+ return _global_selector_locator_chain(node.value, aliases, matches_selector, narrowing_methods)
if isinstance(node, ast.Call) and isinstance(node.func, ast.Attribute):
- is_global_table_locator, has_narrowing = _global_table_locator_chain(node.func.value, aliases)
- if is_global_table_locator and node.func.attr in _TABLE_WAIT_NARROWING_METHODS:
+ is_selector_rooted, has_narrowing = _global_selector_locator_chain(
+ node.func.value, aliases, matches_selector, narrowing_methods
+ )
+ if is_selector_rooted and node.func.attr in narrowing_methods:
return True, True
- return is_global_table_locator, has_narrowing
+ return is_selector_rooted, has_narrowing
return False, False
-def _is_global_page_table_locator_call(node: ast.expr) -> bool:
+def _is_global_page_selector_locator_call(node: ast.expr, matches_selector: Callable[[str], bool]) -> bool:
if not (
isinstance(node, ast.Call)
and isinstance(node.func, ast.Attribute)
@@ -722,13 +795,90 @@ def _is_global_page_table_locator_call(node: ast.expr) -> bool:
):
return False
selector = node.args[0]
- return (
- isinstance(selector, ast.Constant)
- and isinstance(selector.value, str)
- and selector.value.strip().casefold() == "table"
+ return isinstance(selector, ast.Constant) and isinstance(selector.value, str) and matches_selector(selector.value)
+
+
+def _root_readiness_wait_diagnostic(
+ node: ast.Call,
+ aliases: Mapping[str, bool],
+) -> CodeBlockPreflightDiagnostic | None:
+ if not _is_root_readiness_wait(node, aliases):
+ return None
+ return CodeBlockPreflightDiagnostic(
+ code="ROOT_CONTAINER_READINESS_WAIT",
+ message=(
+ "Code block waits on a root container (`body`, `html`, `:root`, `*`) for page readiness. Every "
+ "document already has one, so the wait encodes no precondition: it either passes immediately or "
+ "burns its whole timeout with the container already resolved. Wait on the element whose content "
+ "the block goes on to read, so a failed wait names what was actually missing."
+ ),
+ )
+
+
+def _root_container_text_read_diagnostic(
+ node: ast.Call,
+ aliases: Mapping[str, bool],
+) -> CodeBlockPreflightDiagnostic | None:
+ func = node.func
+ if not isinstance(func, ast.Attribute) or func.attr not in _WHOLE_PAGE_READ_METHODS:
+ return None
+ is_root_locator, has_narrowing = _global_root_locator_chain(func.value, aliases)
+ if not is_root_locator or has_narrowing:
+ return None
+ return CodeBlockPreflightDiagnostic(
+ code="ROOT_CONTAINER_TEXT_READ",
+ message=(
+ "Code block reads text off a root container (`body`, `html`, `:root`, `*`) and scans the result. "
+ "The value then depends on unrelated page copy, and there is no element whose readiness the block "
+ "can wait on. Target the element that carries the value — `get_by_text`, `get_by_role`, or a "
+ "selector verified on this page — and read that."
+ ),
)
+def _is_root_readiness_wait(node: ast.Call, aliases: Mapping[str, bool]) -> bool:
+ func = node.func
+ if not isinstance(func, ast.Attribute):
+ return False
+ if func.attr == "wait_for":
+ if not _waits_for_readiness_state(node):
+ return False
+ is_root_locator, has_narrowing = _global_root_locator_chain(func.value, aliases)
+ return is_root_locator and not has_narrowing
+ if func.attr == "wait_for_selector":
+ if not (isinstance(func.value, ast.Name) and func.value.id == "page" and node.args):
+ return False
+ selector = node.args[0]
+ if not (isinstance(selector, ast.Constant) and isinstance(selector.value, str)):
+ return False
+ return is_root_locator_selector(selector.value) and _waits_for_readiness_state(node)
+ if func.attr in _READINESS_EXPECTATION_METHODS:
+ subject = _expectation_subject(func.value)
+ if subject is None:
+ return False
+ is_root_locator, has_narrowing = _global_root_locator_chain(subject, aliases)
+ return is_root_locator and not has_narrowing
+ return False
+
+
+def _expectation_subject(node: ast.expr) -> ast.expr | None:
+ if isinstance(node, ast.Await):
+ node = node.value
+ if isinstance(node, ast.Call) and isinstance(node.func, ast.Name) and node.func.id == "expect" and node.args:
+ return node.args[0]
+ return None
+
+
+def _waits_for_readiness_state(node: ast.Call) -> bool:
+ """False for disappearance waits (`hidden`/`detached`), where a root container is a deliberate target."""
+ state = next((kwarg.value for kwarg in node.keywords if kwarg.arg == "state"), None)
+ if state is None:
+ return True
+ if not isinstance(state, ast.Constant) or not isinstance(state.value, str):
+ return False
+ return state.value.strip().casefold() in _READINESS_WAIT_STATES
+
+
def _is_global_page_get_by_text_call(node: ast.expr) -> bool:
return (
isinstance(node, ast.Call)
diff --git a/skyvern/forge/sdk/copilot/code_block_synthesis.py b/skyvern/forge/sdk/copilot/code_block_synthesis.py
index f0144821c..b5550510c 100644
--- a/skyvern/forge/sdk/copilot/code_block_synthesis.py
+++ b/skyvern/forge/sdk/copilot/code_block_synthesis.py
@@ -387,6 +387,10 @@ _POSITIONAL_RE = re.compile(
# unique under Playwright strict mode.
_BARE_TAG_RE = re.compile(r"^[a-zA-Z][a-zA-Z0-9-]*$")
+# Root containers every document already has, so a readiness wait on one encodes no precondition:
+# it either passes immediately or burns its whole timeout with the container already resolved.
+_ROOT_LOCATOR_SELECTORS = frozenset({"body", "html", ":root", "*"})
+
@dataclass
class SynthesisDiagnostics:
@@ -623,6 +627,10 @@ def _is_positional_selector(selector: str) -> bool:
return bool(_POSITIONAL_RE.search(selector))
+def is_root_locator_selector(selector: str) -> bool:
+ return selector.strip().casefold() in _ROOT_LOCATOR_SELECTORS
+
+
def _is_bare_ambiguous_selector(selector: str) -> bool:
"""True when the captured selector is a lone tag/role token or the universal `*` with no qualifier."""
stripped = selector.strip()
@@ -1494,6 +1502,21 @@ def _locator_expr(
)
return ""
+ if selector and is_root_locator_selector(selector):
+ if role and name:
+ return _get_by_role_expr_strict(role, name) if strict_selectors else _get_by_role_expr(role, name)
+ notes.append(f"dropped an interaction targeting the root container {selector!r}")
+ if diagnostics is not None:
+ diagnostics.dropped_interactions.append(
+ {
+ "trajectory_index": trajectory_index if trajectory_index is not None else -1,
+ "tool_name": tool_name,
+ "selector": selector,
+ "reason_code": "root_locator_target",
+ }
+ )
+ return ""
+
if strict_selectors:
if not selector:
notes.append("dropped an interaction with no selector")
@@ -1809,6 +1832,14 @@ def _entry_target_locator(
return first_locator, first_index
+def _binds_block_output(interaction: Mapping[str, Any]) -> bool:
+ if str(interaction.get("tool_name") or "") != "read_value":
+ return False
+ return bool(str(interaction.get("read_expression") or "").strip()) and str(
+ interaction.get("read_output_path") or ""
+ ).strip().startswith("output.")
+
+
def _post_auth_resume_locator(trajectory: Sequence[Mapping[str, Any]], *, strict_selectors: bool) -> tuple[str, int]:
last_credential_index = -1
for index, interaction in enumerate(trajectory):
@@ -1924,7 +1955,10 @@ def synthesize_code_block(
if parameter_binding_snapshot is not None
else []
)
- compile_download_target = (
+ download_target_is_root = reached_download_target is not None and is_root_locator_selector(
+ reached_download_target.selector
+ )
+ download_target_deliverable = (
reached_download_target is not None
and not reached_download_target.already_registered
and bool(reached_download_target.selector)
@@ -1933,6 +1967,19 @@ def synthesize_code_block(
# cannot deliver.
and can_deliver_registered_download(reached_download_target)
)
+ compile_download_target = download_target_deliverable and not download_target_is_root
+ if download_target_is_root and download_target_deliverable and reached_download_target is not None:
+ notes.append(
+ f"dropped a download target on the root container {reached_download_target.selector!r}",
+ )
+ diagnostics.dropped_interactions.append(
+ {
+ "trajectory_index": -1,
+ "tool_name": "download",
+ "selector": reached_download_target.selector,
+ "reason_code": "root_locator_target",
+ }
+ )
file_match_locator = ""
file_match_selector = ""
file_match_keys: list[str] = []
@@ -1974,6 +2021,7 @@ def synthesize_code_block(
trajectory, reached_download_target.trajectory_anchor
)
if dropped_trailing:
+ notes.append(f"dropped {dropped_trailing} interaction(s) captured after the download affordance")
diagnostics.download_terminal_anchor = reached_download_target.trajectory_anchor
diagnostics.download_terminal_dropped_trailing = dropped_trailing
LOG.info(
@@ -2153,8 +2201,13 @@ def synthesize_code_block(
fallback_entry_target = durable_anchor_target
entry_target = download_entry_target if download_entry_target else fallback_entry_target
entry_replay_condition_active = bool(download_entry_target and fallback_entry_target)
+ # A skipped prefix is only forgivable when nothing in it would have been emitted; forgiving a
+ # span that holds the read the block returns would drop that answer with no note anywhere.
+ prefix_binds_output = any(_binds_block_output(step) for step in trajectory[entry_index:fallback_entry_index])
entry_replay_start_index = (
- fallback_entry_index if fallback_entry_index > entry_index and not optional_dismissal_prefix else 0
+ fallback_entry_index
+ if fallback_entry_index > entry_index and not optional_dismissal_prefix and not prefix_binds_output
+ else 0
)
if entry_index > 0:
notes.append("entry URL taken from a later interaction; earlier steps had no source_url")
@@ -2162,10 +2215,10 @@ def synthesize_code_block(
notes.append("download fallback entry target taken from a later durable interaction")
if entry_post_auth_resume_index:
notes.append("entry fallback can resume after authentication when login controls stay hidden")
- elif fallback_entry_index > entry_index:
+ elif entry_replay_start_index:
notes.append("entry replay starts at a later durable interaction")
entry_recovery_clicks: list[tuple[int, str]] = []
- if fallback_entry_index > entry_index:
+ if entry_replay_start_index:
for recovery_index in range(entry_index, fallback_entry_index):
recovery_interaction = trajectory[recovery_index]
if not is_generic_entry_opener_click(recovery_interaction):
@@ -2345,6 +2398,7 @@ def synthesize_code_block(
emit_snapshot_recovery(trajectory_index, action_indent)
key = str(interaction.get("key") or "").strip()
if not key:
+ notes.append("dropped a press_key interaction with no recorded key")
diagnostics.dropped_interactions.append(
{"trajectory_index": trajectory_index, "tool_name": tool_name, "reason_code": "missing_key"}
)
@@ -2369,6 +2423,7 @@ def synthesize_code_block(
else:
if strict_selectors:
if not already_recorded(trajectory_index):
+ notes.append("dropped an interaction with no selector")
diagnostics.dropped_interactions.append(
{
"trajectory_index": trajectory_index,
@@ -2390,6 +2445,7 @@ def synthesize_code_block(
expression = str(interaction.get("read_expression") or "").strip()
output_path = str(interaction.get("read_output_path") or "").strip()
if not expression or not output_path.startswith("output."):
+ notes.append("dropped a read with no expression or no output binding")
diagnostics.dropped_interactions.append(
{"trajectory_index": trajectory_index, "tool_name": tool_name, "reason_code": "missing_read"}
)
@@ -2427,6 +2483,7 @@ def synthesize_code_block(
except (TypeError, ValueError):
duration_ms = 0
if duration_ms <= 0:
+ notes.append("dropped a wait interaction with no recorded duration")
diagnostics.dropped_interactions.append(
{"trajectory_index": trajectory_index, "tool_name": tool_name, "reason_code": "missing_duration"}
)
@@ -2686,6 +2743,7 @@ def synthesize_code_block(
if trajectory_index >= truncated_at_index or trajectory_index in laned_indices:
continue
unaccounted = trajectory[trajectory_index]
+ notes.append(f"dropped an unaccounted {str(unaccounted.get('tool_name') or '')!r} interaction")
diagnostics.dropped_interactions.append(
{
"trajectory_index": trajectory_index,
diff --git a/skyvern/forge/sdk/copilot/reached_download_target.py b/skyvern/forge/sdk/copilot/reached_download_target.py
index 9eebada33..36476a44d 100644
--- a/skyvern/forge/sdk/copilot/reached_download_target.py
+++ b/skyvern/forge/sdk/copilot/reached_download_target.py
@@ -291,7 +291,9 @@ def guidance_for(target: ReachedDownloadTarget) -> str:
_EXPECT_DOWNLOAD_ATTR = "expect_download"
-_DOWNLOAD_EVENT_CAPTURE_ATTRS: frozenset[str] = frozenset({"wait_for_event", "expect_event"})
+_DOWNLOAD_EVENT_CAPTURE_ATTRS: frozenset[str] = frozenset(
+ {"wait_for_event", "expect_event", "on", "once", "add_listener"}
+)
_DOWNLOAD_EVENT_NAME = "download"
_REGISTERED_DOWNLOAD_OUTPUT_KEY_SET = frozenset(REGISTERED_DOWNLOAD_OUTPUT_KEYS)
@@ -344,8 +346,9 @@ def _call_is_expect_download(node: ast.expr) -> bool:
def _call_is_download_event_capture(node: ast.expr) -> bool:
- """True for the event-based download idioms ``page.wait_for_event("download")`` /
- ``page.expect_event("download")`` (await-unwrapped, first arg the literal ``"download"``).
+ """True for the event-based download idioms -- ``wait_for_event``/``expect_event`` and the
+ listener spellings ``on``/``once``/``add_listener`` -- taking the literal ``"download"`` as their
+ first argument (await-unwrapped).
A hand-rolled event capture registers the same browser download as ``expect_download`` but evades
the strict ``expect_download`` predicate, so the gate and contract treat it as download intent."""
@@ -387,9 +390,9 @@ def _call_is_download_claim(node: ast.expr) -> bool:
def code_is_download_intent(code: str) -> bool:
"""True when a code block authors a download: it uses the `page.expect_download` context-manager
- idiom, the event-based `page.wait_for_event("download")` / `page.expect_event("download")` idiom,
- or the `click_and_claim_download` helper anywhere, or returns/binds a dict literal carrying an
- execution-layer download registration key."""
+ idiom, any event-based `"download"` capture (`wait_for_event`/`expect_event`/`on`/`once`/
+ `add_listener`), or the `click_and_claim_download` helper anywhere, or returns/binds a dict
+ literal carrying an execution-layer download registration key."""
if not code.strip():
return False
try:
diff --git a/skyvern/forge/sdk/copilot/runtime.py b/skyvern/forge/sdk/copilot/runtime.py
index 2d536b916..35df9c2ea 100644
--- a/skyvern/forge/sdk/copilot/runtime.py
+++ b/skyvern/forge/sdk/copilot/runtime.py
@@ -838,8 +838,8 @@ async def ensure_browser_session(ctx: AgentContext) -> dict[str, Any] | None:
try:
await asyncio.wait_for(
app.PERSISTENT_SESSIONS_MANAGER.close_session(
- organization_id=ctx.organization_id,
- browser_session_id=session.persistent_browser_session_id,
+ ctx.organization_id,
+ session.persistent_browser_session_id,
),
timeout=_SESSION_CLEANUP_TIMEOUT_SECONDS,
)
diff --git a/skyvern/forge/sdk/copilot/tools/run_execution.py b/skyvern/forge/sdk/copilot/tools/run_execution.py
index 02f17ea84..cfbc12fef 100644
--- a/skyvern/forge/sdk/copilot/tools/run_execution.py
+++ b/skyvern/forge/sdk/copilot/tools/run_execution.py
@@ -123,6 +123,8 @@ from skyvern.forge.sdk.workflow.runtime_completion import contract_from_request_
from skyvern.forge.sdk.workflow.service import run_selection_is_partial
from skyvern.schemas.workflows import BlockStatus, BlockType
from skyvern.utils.files import initialize_skyvern_state_file
+from skyvern.webeye.actions.action_types import ActionType
+from skyvern.webeye.actions.actions import ActionStatus
from skyvern.webeye.navigation import is_skip_inner_retry_error
from skyvern.webeye.utils.page import SkyvernFrame
@@ -407,15 +409,26 @@ async def _attach_action_traces(
if block_result.get("status") not in _FAILED_BLOCK_STATUSES or not block.task_id:
continue
task_actions = actions_by_task.get(block.task_id, [])
- block_result["action_trace"] = [
- {
- "action": a.action_type,
- "status": a.status,
- "reasoning": a.reasoning[:150] if a.reasoning else None,
- "element": a.element_id,
+ action_trace = []
+ for action in task_actions:
+ entry = {
+ "action": action.action_type,
+ "status": action.status,
+ "reasoning": action.reasoning[:150] if action.reasoning else None,
+ "element": action.element_id,
}
- for a in task_actions
- ]
+ output = action.output
+ code_line = output.get("code_line") if isinstance(output, dict) else None
+ if (
+ action.action_type == ActionType.NULL_ACTION
+ and action.status == ActionStatus.failed
+ and type(code_line) is int
+ and action.description
+ ):
+ entry["description"] = action.description[:150]
+ entry["code_line"] = code_line
+ action_trace.append(entry)
+ block_result["action_trace"] = action_trace
async def _fetch_last_screenshot_b64(task_id: str, organization_id: str) -> str | None:
@@ -565,21 +578,27 @@ def _block_end_urls_by_label(run_block_rows: list[WorkflowRunBlock]) -> dict[str
def _summarize_action_trace(action_trace: list[dict[str, Any]] | None) -> list[str]:
- """Compact, stringified summary of action entries for the compact packet."""
+ """Render the six newest action entries chronologically for the compact packet."""
if not action_trace:
return []
summary: list[str] = []
- for entry in action_trace[-6:]:
+ for entry in reversed(action_trace[:6]):
if not isinstance(entry, dict):
continue
action = entry.get("action") or "?"
status = entry.get("status") or ""
element = entry.get("element")
+ description = entry.get("description")
+ code_line = entry.get("code_line")
bits = [str(action)]
if element:
bits.append(str(element))
if status:
bits.append(str(status))
+ if isinstance(description, str) and description:
+ bits.append(f"description={description}")
+ if type(code_line) is int:
+ bits.append(f"code_line={code_line}")
summary.append(" ".join(bits).strip())
return summary
diff --git a/skyvern/forge/sdk/copilot/tools/workflow_update.py b/skyvern/forge/sdk/copilot/tools/workflow_update.py
index 6feee8dc5..fab5051f6 100644
--- a/skyvern/forge/sdk/copilot/tools/workflow_update.py
+++ b/skyvern/forge/sdk/copilot/tools/workflow_update.py
@@ -39,6 +39,7 @@ from skyvern.forge.sdk.copilot.build_test_outcome import (
recorded_outcome_from_author_time_reject,
)
from skyvern.forge.sdk.copilot.canonical_ownership import workflow_content_fingerprint
+from skyvern.forge.sdk.copilot.code_block_preflight import advisory_code_block_diagnostics
from skyvern.forge.sdk.copilot.code_block_security import CodeBlockSecurityError, author_time_code_security_errors
from skyvern.forge.sdk.copilot.code_block_steps import bind_referenced_parameters_in_yaml
from skyvern.forge.sdk.copilot.code_block_synthesis import wrapped_code_ast as _wrapped_code_ast
@@ -715,13 +716,7 @@ def _withheld_labels_within(labels: list[str], budget: int) -> list[str]:
return exhausted if len(json.dumps(exhausted)) <= budget else []
-def _accepted_code_delta(
- prior_yaml: str | None, submitted_yaml: str, accepted_yaml: str
-) -> tuple[dict[str, str], list[str]]:
- """Code blocks the accepted submission changed, as stored after server-side rewrites, paired
- with the labels that did not fit the budget so an omission is named rather than silent. A block
- the server did not rewrite is returned too, because the anchor has to survive context
- compaction and a payload that carried only rewrites would make its own absence ambiguous."""
+def _changed_code_blocks(prior_yaml: str | None, submitted_yaml: str, accepted_yaml: str) -> dict[str, str]:
prior = _workflow_yaml_code_blocks_by_label(prior_yaml)
submitted = _workflow_yaml_code_blocks_by_label(submitted_yaml)
accepted = _workflow_yaml_code_blocks_by_label(accepted_yaml)
@@ -737,6 +732,26 @@ def _accepted_code_delta(
if unchanged_since_prior and matches_submission:
continue
changed[label] = code
+ return changed
+
+
+def _advisory_labels_by_message(changed_code_blocks: Mapping[str, str]) -> dict[str, list[str]]:
+ """Labels per advisory message, computed from every changed block rather than the
+ budget-truncated ``stored_code`` so an oversized block still gets its note."""
+ labels_by_message: dict[str, list[str]] = {}
+ for label, code in sorted(changed_code_blocks.items()):
+ for diagnostic in advisory_code_block_diagnostics(code):
+ labels = labels_by_message.setdefault(diagnostic.message, [])
+ if label not in labels:
+ labels.append(label)
+ return labels_by_message
+
+
+def _accepted_code_delta(changed: Mapping[str, str]) -> tuple[dict[str, str], list[str]]:
+ """Code blocks the accepted submission changed, as stored after server-side rewrites, paired
+ with the labels that did not fit the budget so an omission is named rather than silent. A block
+ the server did not rewrite is returned too, because the anchor has to survive context
+ compaction and a payload that carried only rewrites would make its own absence ambiguous."""
if not changed:
return {}, []
@@ -3751,6 +3766,7 @@ def _author_time_findings(
*,
schema_incompatibility: SchemaIncompatibility | None,
metadata_violations: Sequence[str],
+ code_block_diagnostics: Mapping[str, list[str]] | None = None,
) -> list[dict[str, Any]]:
"""Non-blocking labels on a draft that persisted anyway. Each entry needs a reason a
test-run would not surface it; anything a run reveals belongs in the run, not here."""
@@ -3774,6 +3790,18 @@ def _author_time_findings(
"summary": "\n".join(str(violation) for violation in metadata_violations),
}
)
+ # A contentless readiness wait is intermittent by construction: it passes on every run where the
+ # page happens to settle, so a green test-run cannot tell the author the wait encodes nothing.
+ if code_block_diagnostics:
+ findings.append(
+ {
+ "reason_code": "code_block_readiness_wait_advisory",
+ "summary": "\n".join(
+ f"Code blocks {', '.join(f'`{label}`' for label in labels)}: {message}"
+ for message, labels in code_block_diagnostics.items()
+ ),
+ }
+ )
return findings
@@ -4132,9 +4160,8 @@ async def _update_workflow(
"message": "Workflow updated successfully.",
"block_count": len(workflow.workflow_definition.blocks) if workflow.workflow_definition else 0,
}
- stored_code, stored_code_withheld = _accepted_code_delta(
- prior_workflow_yaml, submitted_workflow_yaml, workflow_yaml
- )
+ changed_code_blocks = _changed_code_blocks(prior_workflow_yaml, submitted_workflow_yaml, workflow_yaml)
+ stored_code, stored_code_withheld = _accepted_code_delta(changed_code_blocks)
if stored_code:
data["stored_code"] = stored_code
if stored_code_withheld:
@@ -4145,9 +4172,17 @@ async def _update_workflow(
returned_chars={label: len(code) for label, code in stored_code.items()},
withheld_labels=stored_code_withheld,
)
+ # Best-effort — the workflow is already persisted by this point, so an advisory that trips on
+ # crafted block code must never turn a successful update into a failed turn.
+ try:
+ advisory_labels = _advisory_labels_by_message(changed_code_blocks)
+ except Exception as advisory_err:
+ LOG.warning("copilot_advisory_code_block_diagnostics_failed", error=str(advisory_err))
+ advisory_labels = {}
findings = _author_time_findings(
schema_incompatibility=schema_incompatibility_finding,
metadata_violations=normalization.violations,
+ code_block_diagnostics=advisory_labels,
)
if findings:
data["findings"] = findings
diff --git a/skyvern/forge/sdk/core/skyvern_context.py b/skyvern/forge/sdk/core/skyvern_context.py
index 53cdde9c4..4a37b8cf1 100644
--- a/skyvern/forge/sdk/core/skyvern_context.py
+++ b/skyvern/forge/sdk/core/skyvern_context.py
@@ -246,6 +246,10 @@ class SkyvernContext:
# stores pre-scraped data for next step to avoid re-scraping
next_step_pre_scraped_data: dict[str, Any] | None = None
speculative_plans: dict[str, Any] = field(default_factory=dict)
+ # Writes that persist the cost of an already-billed speculative LLM call. They are
+ # started as background tasks so the completion path doesn't wait on the LLM call,
+ # and drained at task clean-up so the write can't be dropped when the run tears down.
+ pending_speculative_persist_tasks: list[asyncio.Task] = field(default_factory=list)
"""
Example output value:
diff --git a/skyvern/forge/sdk/db/repositories/observer.py b/skyvern/forge/sdk/db/repositories/observer.py
index 7843a97d1..645d69474 100644
--- a/skyvern/forge/sdk/db/repositories/observer.py
+++ b/skyvern/forge/sdk/db/repositories/observer.py
@@ -1,6 +1,5 @@
from __future__ import annotations
-from datetime import datetime, timezone
from typing import TYPE_CHECKING, Any, Callable
import structlog
@@ -10,6 +9,7 @@ from sqlalchemy.exc import SQLAlchemyError
from skyvern.forge.sdk.db._error_handling import db_operation
from skyvern.forge.sdk.db.base_alchemy_db import read_retry
from skyvern.forge.sdk.db.base_repository import BaseRepository
+from skyvern.forge.sdk.db.datetime_utils import naive_utc_now
from skyvern.forge.sdk.db.exceptions import NotFoundError
if TYPE_CHECKING:
@@ -374,11 +374,11 @@ class ObserverRepository(BaseRepository):
if status:
task_v2.status = status
if status == TaskV2Status.queued and task_v2.queued_at is None:
- task_v2.queued_at = datetime.now(timezone.utc)
+ task_v2.queued_at = naive_utc_now()
if status == TaskV2Status.running and task_v2.started_at is None:
- task_v2.started_at = datetime.now(timezone.utc)
+ task_v2.started_at = naive_utc_now()
if status.is_final() and task_v2.finished_at is None:
- task_v2.finished_at = datetime.now(timezone.utc)
+ task_v2.finished_at = naive_utc_now()
if workflow_run_id:
task_v2.workflow_run_id = workflow_run_id
if workflow_id:
diff --git a/skyvern/forge/sdk/db/repositories/tasks.py b/skyvern/forge/sdk/db/repositories/tasks.py
index 6db3823eb..1c7e6944b 100644
--- a/skyvern/forge/sdk/db/repositories/tasks.py
+++ b/skyvern/forge/sdk/db/repositories/tasks.py
@@ -316,6 +316,35 @@ class TasksRepository(BaseRepository):
query = select(func.count()).select_from(unique_step_orders)
return (await session.execute(query)).scalar()
+ @db_operation("get_total_unique_progress_round_count_by_task_ids")
+ async def get_total_unique_progress_round_count_by_task_ids(
+ self,
+ *,
+ task_ids: list[str],
+ organization_id: str,
+ ) -> int:
+ """Distinct (task_id, order) pairs across steps UNION actions' round-stamped step_order.
+
+ A step-engine action's step_order mirrors an existing step order, so the union equals the
+ step count; a task_v3 task has one Step row but round-stamped actions, so each of its
+ action rounds counts individually. This is the workflow-run step-budget unit.
+ """
+ async with self.Session() as session:
+ step_pairs = (
+ select(StepModel.task_id, StepModel.order)
+ .where(StepModel.task_id.in_(task_ids))
+ .where(StepModel.organization_id == organization_id)
+ )
+ action_pairs = (
+ select(ActionModel.task_id, ActionModel.step_order)
+ .where(ActionModel.task_id.in_(task_ids))
+ .where(ActionModel.organization_id == organization_id)
+ .where(ActionModel.step_order.is_not(None))
+ )
+ union_pairs = step_pairs.union(action_pairs).subquery()
+ query = select(func.count()).select_from(union_pairs)
+ return (await session.execute(query)).scalar() or 0
+
@db_operation("get_task_step_models")
async def get_task_step_models(self, task_id: str, organization_id: str | None = None) -> Sequence[StepModel]:
async with self.Session() as session:
@@ -486,48 +515,52 @@ class TasksRepository(BaseRepository):
created_by: str | None = None,
last_llm_model: str | None = None,
) -> Step:
- async with self.Session() as session:
- if step := (
- await session.scalars(
- select(StepModel)
- .filter_by(task_id=task_id)
- .filter_by(step_id=step_id)
- .filter_by(organization_id=organization_id)
+ values: dict[str, Any] = {}
+ if status is not None:
+ values["status"] = status
+ if status.is_terminal():
+ values["finished_at"] = func.coalesce(StepModel.finished_at, naive_utc_now())
+ if output is not None:
+ values["output"] = output.model_dump(exclude_none=True)
+ if is_last is not None:
+ values["is_last"] = is_last
+ if retry_index is not None:
+ values["retry_index"] = retry_index
+ # Accumulated in SQL, not Python: concurrent LLM calls against the same step would
+ # otherwise both read the pre-increment value and the later commit would drop the earlier one.
+ for column, delta in (
+ (StepModel.step_cost, incremental_cost),
+ (StepModel.input_token_count, incremental_input_tokens),
+ (StepModel.output_token_count, incremental_output_tokens),
+ (StepModel.reasoning_token_count, incremental_reasoning_tokens),
+ (StepModel.cached_token_count, incremental_cached_tokens),
+ ):
+ if delta is not None:
+ values[column.key] = func.coalesce(column, 0) + delta
+ if created_by is not None:
+ values["created_by"] = created_by
+ if last_llm_model is not None:
+ values["last_llm_model"] = last_llm_model
+
+ if values:
+ async with self.Session() as session:
+ result = await session.execute(
+ update(StepModel)
+ .where(StepModel.task_id == task_id)
+ .where(StepModel.step_id == step_id)
+ .where(StepModel.organization_id == organization_id)
+ .values(values)
)
- ).first():
- if status is not None:
- step.status = status
-
- if status.is_terminal() and step.finished_at is None:
- step.finished_at = naive_utc_now()
- if output is not None:
- step.output = output.model_dump(exclude_none=True)
- if is_last is not None:
- step.is_last = is_last
- if retry_index is not None:
- step.retry_index = retry_index
- if incremental_cost is not None:
- step.step_cost = incremental_cost + float(step.step_cost or 0)
- if incremental_input_tokens is not None:
- step.input_token_count = incremental_input_tokens + (step.input_token_count or 0)
- if incremental_output_tokens is not None:
- step.output_token_count = incremental_output_tokens + (step.output_token_count or 0)
- if incremental_reasoning_tokens is not None:
- step.reasoning_token_count = incremental_reasoning_tokens + (step.reasoning_token_count or 0)
- if incremental_cached_tokens is not None:
- step.cached_token_count = incremental_cached_tokens + (step.cached_token_count or 0)
- if created_by is not None:
- step.created_by = created_by
- if last_llm_model is not None:
- step.last_llm_model = last_llm_model
-
- await session.commit()
- updated_step = await self.get_step(step_id, organization_id)
- if not updated_step:
+ if result.rowcount == 0:
raise NotFoundError("Step not found")
- return updated_step
- else:
- raise NotFoundError("Step not found")
+ await session.commit()
+
+ updated_step = await self.get_step(step_id, organization_id)
+ # get_step does not scope by task_id, so re-check it here: a call carrying no field to
+ # update never runs the statement above and would otherwise skip that filter entirely.
+ if not updated_step or updated_step.task_id != task_id:
+ raise NotFoundError("Step not found")
+ return updated_step
@db_operation("clear_task_failure_reason")
async def clear_task_failure_reason(self, organization_id: str, task_id: str) -> Task:
@@ -659,16 +692,23 @@ class TasksRepository(BaseRepository):
task_ids: list[str],
status: TaskStatus | None = None,
failure_reason: str | None = None,
- ) -> None:
+ only_if_status_in: list[TaskStatus] | None = None,
+ ) -> list[str]:
"""Bulk update tasks by their IDs.
Args:
task_ids: List of task IDs to update
status: Optional status to set for all tasks
failure_reason: Optional failure reason to set for all tasks
+ only_if_status_in: Optional status whitelist used as a compare-and-set guard
+
+ Returns:
+ IDs of rows that matched the update. Callers that fan out side effects
+ (webhooks) must drive them from this list, not from `task_ids`, so a task
+ claimed by another sweeper is not acted on twice.
"""
if not task_ids:
- return
+ return []
async with self.Session() as session:
update_values = {}
@@ -677,10 +717,18 @@ class TasksRepository(BaseRepository):
if failure_reason:
update_values["failure_reason"] = failure_reason
- if update_values:
- update_stmt = update(TaskModel).where(TaskModel.task_id.in_(task_ids)).values(**update_values)
- await session.execute(update_stmt)
- await session.commit()
+ if not update_values:
+ return []
+
+ update_stmt = update(TaskModel).where(TaskModel.task_id.in_(task_ids))
+ if only_if_status_in is not None:
+ update_stmt = update_stmt.where(
+ TaskModel.status.in_([eligible_status.value for eligible_status in only_if_status_in])
+ )
+ result = await session.execute(update_stmt.values(**update_values).returning(TaskModel.task_id))
+ updated_task_ids = list(result.scalars().all())
+ await session.commit()
+ return updated_task_ids
@db_operation("bulk_update_tasks_by_workflow_run_ids")
async def bulk_update_tasks_by_workflow_run_ids(
diff --git a/skyvern/forge/sdk/routes/browser_sessions.py b/skyvern/forge/sdk/routes/browser_sessions.py
index 00bd70444..62ad38ba0 100644
--- a/skyvern/forge/sdk/routes/browser_sessions.py
+++ b/skyvern/forge/sdk/routes/browser_sessions.py
@@ -37,6 +37,7 @@ from skyvern.schemas.action_log import (
ActionLogPage,
sanitize_action_log_event,
)
+from skyvern.schemas.browser_session_timeouts import MAX_TIMEOUT, MAX_TIMEOUT_EXCEEDED_MESSAGE
from skyvern.schemas.browser_sessions import (
CreateBrowserSessionRequest,
ProcessBrowserSessionRecordingRequest,
@@ -158,6 +159,7 @@ async def get_browser_sessions_all(
summary="Create a session",
responses={
200: {"description": "Successfully created browser session"},
+ 400: {"description": f"Requested timeout exceeds the {MAX_TIMEOUT}-minute maximum"},
403: {"description": "Unauthorized - Invalid or missing authentication"},
404: {"description": "Browser profile not found"},
},
@@ -171,6 +173,8 @@ async def create_browser_session(
browser_session_request: CreateBrowserSessionRequest = CreateBrowserSessionRequest(),
current_org: Organization = Depends(org_auth_service.get_current_org),
) -> BrowserSessionResponse:
+ if browser_session_request.timeout is not None and browser_session_request.timeout > MAX_TIMEOUT:
+ raise HTTPException(status_code=400, detail=MAX_TIMEOUT_EXCEEDED_MESSAGE)
proxy_location = browser_session_request.proxy_location
proxy_session_id = browser_session_request.proxy_session_id
if browser_session_request.browser_profile_id:
diff --git a/skyvern/forge/sdk/schemas/workflow_copilot.py b/skyvern/forge/sdk/schemas/workflow_copilot.py
index 784505e09..688dfb7f8 100644
--- a/skyvern/forge/sdk/schemas/workflow_copilot.py
+++ b/skyvern/forge/sdk/schemas/workflow_copilot.py
@@ -150,14 +150,6 @@ class WorkflowCopilotChatRequest(BaseModel):
"other block unchanged. Used by the block-level Generate action."
),
)
- fix_origin: bool = Field(
- False,
- description=(
- "True when the turn originates from the 'Fix with Copilot' action on a failed run. Carried as "
- "provenance only: it does not change the turn's routing or tool authority, which come from the "
- "request policy and the run the turn is grounded in."
- ),
- )
supports_credential_pause: bool = Field(
False,
description=(
diff --git a/skyvern/forge/sdk/workflow/context_manager.py b/skyvern/forge/sdk/workflow/context_manager.py
index de19b35c8..f73e40e61 100644
--- a/skyvern/forge/sdk/workflow/context_manager.py
+++ b/skyvern/forge/sdk/workflow/context_manager.py
@@ -1948,6 +1948,18 @@ class WorkflowContextManager:
secret_values -= set(totp_values)
return secret_values | task_secret_values
+ def runtime_secret_values_for_artifacts(self) -> set[str]:
+ """Runtime-resolved secrets (e.g. a v3-resolved verification code) redact under the global
+ switch alone, regardless of a run's per-workflow mask-secrets opt-in. Covers only
+ engine-minted runtime values — customer-configured credential values stay governed by the
+ per-run opt-in, matching the step engine."""
+ if not settings.ENABLE_SECRET_ARTIFACT_REDACTION:
+ return set()
+ current_context = skyvern_context.current()
+ if current_context is None:
+ return set()
+ return collect_redactable_secret_values({}, otp_values=list(current_context.runtime_secret_values))
+
async def register_block_parameters_for_workflow_run(
self,
workflow_run_id: str,
diff --git a/skyvern/forge/sdk/workflow/models/block.py b/skyvern/forge/sdk/workflow/models/block.py
index 3a6f59e06..f38fe0b65 100644
--- a/skyvern/forge/sdk/workflow/models/block.py
+++ b/skyvern/forge/sdk/workflow/models/block.py
@@ -3969,6 +3969,18 @@ CODE_BLOCK_GENERIC_FAILURE_REASON = "Failed to execute code block."
CODE_BLOCK_FAILURE_REASON_MAX_CHARS = 2000
+def _code_block_failure_action(*, failing_line: int | None, action_order: int, response: str = "") -> Action:
+ return Action(
+ action_id=generate_action_id(),
+ action_type=ActionType.NULL_ACTION,
+ status=ActionStatus.failed,
+ action_order=action_order,
+ description=f"code error at line {failing_line}" if failing_line else "code error",
+ response=response[:500],
+ output={"code_line": failing_line},
+ )
+
+
def _page_open_error_label(error: BaseException) -> str:
# Playwright maps only TimeoutError/TargetClosedError to their own Python classes; every
# other driver failure is the base Error whose .name carries the real class (e.g. TypeError).
@@ -7009,9 +7021,21 @@ async def wrapper({default_args}):
block_label=self.label,
)
if secure_code_block_result is not None:
- await recorder.persist(recorder.recorded_actions())
- if secure_code_block_result.failure is not None:
- secure_failure = secure_code_block_result.failure
+ recorded = recorder.recorded_actions()
+ secure_failure = secure_code_block_result.failure
+ if (
+ secure_failure is not None
+ and type(secure_failure.failing_line) is int
+ and secure_failure.failing_line > 0
+ ):
+ recorded.append(
+ _code_block_failure_action(
+ failing_line=secure_failure.failing_line,
+ action_order=len(recorded),
+ )
+ )
+ await recorder.persist(recorded)
+ if secure_failure is not None:
secure_classification = (
HealClassification(
healable=False,
@@ -7385,15 +7409,10 @@ async def wrapper({default_args}):
if recorder.last_recorded_exception() is not e:
# The exception did not come from a recorded page call; add a synthetic failure row.
recorded.append(
- Action(
- # Synthesized outside the recorder, so it needs its own stable id for the upsert path.
- action_id=generate_action_id(),
- action_type=ActionType.NULL_ACTION,
- status=ActionStatus.failed,
+ _code_block_failure_action(
action_order=len(recorded),
- description=f"code error at line {failing_line}" if failing_line else "code error",
response=(failure_reason or "")[:500],
- output={"code_line": failing_line},
+ failing_line=failing_line,
)
)
await recorder.persist(recorded)
diff --git a/skyvern/forge/sdk/workflow/service.py b/skyvern/forge/sdk/workflow/service.py
index 7fb1719b8..7af2f097a 100644
--- a/skyvern/forge/sdk/workflow/service.py
+++ b/skyvern/forge/sdk/workflow/service.py
@@ -11550,6 +11550,10 @@ class WorkflowService:
if app.WORKFLOW_CONTEXT_MANAGER.secret_redaction_enabled_for_run(workflow_run.workflow_run_id):
secret_values = app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run(workflow_run.workflow_run_id)
har_data = await asyncio.to_thread(redact_har_bytes, har_data, secret_values)
+ else:
+ runtime_secret_values = app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts()
+ if runtime_secret_values:
+ har_data = await asyncio.to_thread(redact_har_bytes, har_data, runtime_secret_values)
if settings.SKYVERN_SUBMISSION_SIGNAL_SHADOW:
submission_shadow.schedule_submission_signal_shadow(
har_data=har_data,
@@ -11580,6 +11584,10 @@ class WorkflowService:
if app.WORKFLOW_CONTEXT_MANAGER.secret_redaction_enabled_for_run(workflow_run.workflow_run_id):
secret_values = app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run(workflow_run.workflow_run_id)
browser_log = await asyncio.to_thread(redact_console_log_bytes, browser_log, secret_values)
+ else:
+ runtime_secret_values = app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts()
+ if runtime_secret_values:
+ browser_log = await asyncio.to_thread(redact_console_log_bytes, browser_log, runtime_secret_values)
LOG.debug("Persisting browser log", browser_log_size=len(browser_log))
if browser_log:
await app.ARTIFACT_MANAGER.create_artifact(
@@ -11631,9 +11639,12 @@ class WorkflowService:
secret_values = (
app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run(workflow_run.workflow_run_id)
if redaction_enabled
- else set()
+ else app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts()
)
- if redaction_enabled:
+ # Opted-in runs always redact (even an empty full set); opted-out runs redact only when a
+ # runtime secret was actually registered, so the no-secrets case skips the redact call.
+ should_redact = redaction_enabled or bool(secret_values)
+ if should_redact:
browser_log = await asyncio.to_thread(redact_console_log_bytes, browser_log, secret_values)
LOG.debug("Persisting browser log (bundled)", browser_log_size=len(browser_log))
if browser_log:
@@ -11644,7 +11655,7 @@ class WorkflowService:
workflow_run_id=workflow_run.workflow_run_id,
browser_state=browser_state,
)
- if redaction_enabled:
+ if should_redact:
har_data = await asyncio.to_thread(redact_har_bytes, har_data, secret_values)
if settings.SKYVERN_SUBMISSION_SIGNAL_SHADOW:
submission_shadow.schedule_submission_signal_shadow(
diff --git a/skyvern/forge/sdk/workflow/workflow_definition_converter.py b/skyvern/forge/sdk/workflow/workflow_definition_converter.py
index 4be456717..14ed99af3 100644
--- a/skyvern/forge/sdk/workflow/workflow_definition_converter.py
+++ b/skyvern/forge/sdk/workflow/workflow_definition_converter.py
@@ -757,13 +757,14 @@ def block_yaml_to_block(
return ValidationBlock(
**base_kwargs,
task_type=TaskType.validation,
+ engine=block_yaml.engine,
parameters=validation_block_parameters,
complete_criterion=block_yaml.complete_criterion,
terminate_criterion=block_yaml.terminate_criterion,
error_code_mapping=block_yaml.error_code_mapping,
without_page_information=block_yaml.without_page_information,
- # Should only need one step for validation block, but we allow 2 in case the LLM has an unexpected failure and we need to retry.
- max_steps_per_run=2,
+ # Default is 2 (1 attempt + 1 retry); an explicit yaml value overrides it.
+ max_steps_per_run=block_yaml.max_steps_per_run if block_yaml.max_steps_per_run is not None else 2,
)
elif block_yaml.block_type == BlockType.ACTION:
@@ -791,7 +792,8 @@ def block_yaml_to_block(
disable_cache=block_yaml.disable_cache,
# DO NOT run complete verification for action block
complete_verification=False,
- max_steps_per_run=1,
+ # Default is 1 (a single atomic action); an explicit yaml value overrides it.
+ max_steps_per_run=block_yaml.max_steps_per_run if block_yaml.max_steps_per_run is not None else 1,
)
elif block_yaml.block_type == BlockType.NAVIGATION:
diff --git a/skyvern/forge/taskv3/auth_tools.py b/skyvern/forge/taskv3/auth_tools.py
index 4d8c49676..6a9dee2ce 100644
--- a/skyvern/forge/taskv3/auth_tools.py
+++ b/skyvern/forge/taskv3/auth_tools.py
@@ -35,11 +35,8 @@ _GUIDANCE = (
def build_auth_tools(task: Task) -> tuple[list[ToolSpec], str]:
"""Return (tools, system-prompt guidance) for verification-code handling, or ([], "") when the
task has no verification-code source configured (so the tool isn't offered needlessly)."""
- # v3 only runs code sources it can actually service: a totp_verification_url task stays on the step
- # engine (the v3 dispatch gate excludes it), so it never reaches this builder — gating on it would be
- # dead. Credential-vault TOTP discrimination needs active_credential_parameter_key, which only v1's
- # action handler sets, so multiple TOTP credentials can't disambiguate on v3 — not reachable today
- # (v3 runs bare tasks, not workflow blocks); revisit with v3 credential support.
+ # totp_verification_url tasks stay on the step engine (v3 dispatch gate excludes them), so gating on
+ # it here is dead; a block with 2+ login-credential parameters still can't disambiguate TOTP.
payload_otp_value = extract_totp_from_navigation_inputs(task.navigation_payload)
has_code_source = bool(
(payload_otp_value is not None and payload_otp_value.get_otp_type() == OTPType.TOTP)
diff --git a/skyvern/forge/taskv3/engine.py b/skyvern/forge/taskv3/engine.py
index 0ebd84d6d..0ac2e7b6a 100644
--- a/skyvern/forge/taskv3/engine.py
+++ b/skyvern/forge/taskv3/engine.py
@@ -1,10 +1,10 @@
"""Native Task V3 engine: assemble prompts + raw-browser tools + the tool-loop.
-This is the platform-agnostic core of the native (non-Bun) engine. Given a live
-Playwright page and an ``LLMCaller``, it runs one persistent conversation that
-perceives via ``observe`` and acts by selector until the model calls ``finish``.
-Callers (the run/step dispatch) own browser acquisition, the concrete LLMCaller,
-and mapping the returned ``LoopOutcome`` onto the task's status/output.
+This is the platform-agnostic core of the native (non-Bun) engine. Given a page provider
+(resolved fresh on every tool call, not a page bound once) and an ``LLMCaller``, it runs
+one persistent conversation that perceives via ``observe`` and acts by selector until the
+model calls ``finish``. Callers (the run/step dispatch) own browser acquisition, the
+concrete LLMCaller, and mapping the returned ``LoopOutcome`` onto the task's status/output.
Perception defaults to the compact ``observe`` snapshot rather than raw HTML: on
real-world multi-field forms compact-observe matched raw-DOM on cost/latency with a
@@ -26,9 +26,10 @@ from typing import Any, Awaitable, Callable
import structlog
+from skyvern.config import settings
from skyvern.forge.sdk.api.llm.exceptions import LLMProviderErrorRetryableTask
from skyvern.forge.taskv3.loop import LoopOutcome, ToolSpec, make_finish_tool, run_agent_tool_loop
-from skyvern.forge.taskv3.tools import build_browser_tools
+from skyvern.forge.taskv3.tools import PageProvider, build_browser_tools
LOG = structlog.get_logger()
@@ -51,6 +52,8 @@ MAX_TOOL_CALLS_PER_ACTION_STEP = 25
# cap can't cut a productive run short; this only raises a low cap and never lowers a generous one.
MIN_ACTION_STEPS = 20
+PAGE_FREE_SYSTEM_PROMPT = """You are completing a data-only assessment. You have NO browser tools: do not attempt to observe or interact with any page. Judge strictly from the goal, criteria, and data provided, then call `finish(status, reason, extracted_output)` — status=completed when the completion criterion holds, status=terminated when the termination criterion holds, status=failed only if the provided information is insufficient to decide."""
+
SYSTEM_PROMPT = """You are an autonomous web agent completing a browser task. You drive the browser ONLY through the provided tools; nothing about the page is shown to you unless you call a tool.
How to work:
@@ -61,7 +64,7 @@ How to work:
- Autocomplete / typeahead / combobox fields (location, school, employer lookups) render suggestions only AFTER you type, and the raw text you type is NOT accepted until you pick a suggestion. Use the `select_combobox` tool (selector + value) for these — it types, waits for the suggestions to render, selects the best-matching one, and verifies the field committed. Do NOT `type` into them or press keys yourself. If `select_combobox` returns an error, the field is genuinely unfilled — try a fuller value or report it; never treat it as done.
- `observe` already gives you everything you need to fill a field (selector, label, type, current value, options, and the surrounding question text) — act on it directly. `get_html` is a rare last resort for ONE specific element `observe` failed to describe: NEVER call it on a whole page/form/section, NEVER call it twice for the same element, and NEVER inspect more than once before acting.
- Inspecting the page does NOT progress the task — only `type`/`select_option`/`click` do. If your recent turns were mostly `observe`/`get_html` with little typing or clicking, you are stuck inspecting: stop, and fill every field you can from the latest `observe` snapshot using its selectors before doing anything else.
-- Before calling finish with status=completed, re-check with `observe` that every required field holds its intended value and the only remaining step is the final submit; fix anything missing first. Call `finish(status, reason, extracted_output)` when the goal is achieved (completed) or impossible/blocked (failed/terminated).
+- Before calling finish with status=completed, re-check with `observe` that the goal's effect is present in the page's SETTLED, loaded content (no loading indicators or empty panels standing in for it), that every required field holds its intended value, and that the only remaining step is the final submit; fix anything missing first. Call `finish(status, reason, extracted_output)` when the goal is achieved (completed) or impossible/blocked (failed/terminated).
Rules:
- Fill fields from the task's data and satisfy required fields rather than failing over a missing value: prefer the provided values, and for an ordinary required field with no exact value, enter the most reasonable value you can. Do not invent sensitive or identifying values (government IDs, financial details, or legal/eligibility attestations); if one of those is required and not provided, stop and report it rather than guessing. Leave optional fields blank when you have no basis to fill them.
@@ -122,9 +125,20 @@ def _build_user_prompt(goal: str, parameters: dict[str, Any] | None, starting_ur
return "\n".join(parts)
+def _build_call_kwargs(step: Any, llm_caller: Any) -> dict[str, Any] | None:
+ # Asking here rather than only letting the LLM layer drop it keeps the run's own telemetry
+ # honest: a run that reports tool_choice in effect has to have actually sent it.
+ call_kwargs: dict[str, Any] = {}
+ if step is not None:
+ call_kwargs["step"] = step
+ if settings.TASK_V3_TOOL_CHOICE_REQUIRED and llm_caller.supports_tool_choice():
+ call_kwargs["tool_choice"] = "required"
+ return call_kwargs or None
+
+
async def run_task_v3_agent_loop(
*,
- page: Any,
+ page_provider: PageProvider,
llm_caller: Any,
goal: str,
parameters: dict[str, Any] | None = None,
@@ -137,26 +151,43 @@ async def run_task_v3_agent_loop(
prompt_name: str = "taskv3-agent-loop",
step: Any = None,
should_cancel: Callable[[], Awaitable[bool]] | None = None,
- on_action_round: Callable[[list[tuple[str, dict[str, Any]]]], Awaitable[None]] | None = None,
+ on_action_round: Callable[[list[tuple[str, dict[str, Any], bool]]], Awaitable[None]] | None = None,
extra_tools: list[ToolSpec] | None = None,
extra_system_guidance: str = "",
max_tokens: int | None = DEFAULT_MAX_TOKENS,
deadline_seconds: float | None = DEFAULT_DEADLINE_SECONDS,
+ resolve_typed_text: Callable[[str], Any] | None = None,
+ page_free: bool = False,
+ settle_probe: Callable[[], Awaitable[bool]] | None = None,
) -> LoopOutcome:
"""Run one Task V3 task to completion against `page`, returning the loop outcome.
`step` is threaded into every LLMCaller.call so the run's cost/tokens/model and LLM
artifacts attribute to it. `should_cancel` is polled between turns and mid-batch; token
- and wall-clock budgets bound cost beyond the turn/tool-call caps. The pre-finish
- re-verification is guidance in the system prompt, not a forced extra model turn."""
- tools = (
- build_browser_tools(page, downloads_dir=downloads_dir, organization_id=organization_id)
- + (extra_tools or [])
- + [make_finish_tool()]
+ and wall-clock budgets bound cost beyond the turn/tool-call caps. When a
+ `settle_probe` is provided, a finish(completed) on an unsettled page IS forced back for a
+ bounded re-verification turn; without one, pre-finish re-verification is prompt guidance only."""
+ # Page-free mode is structural, not advisory: no browser tools exist to call and the system
+ # prompt never mentions perception, so a data-only validation cannot read the live DOM.
+ browser_tools = (
+ []
+ if page_free
+ else build_browser_tools(
+ page_provider,
+ downloads_dir=downloads_dir,
+ organization_id=organization_id,
+ resolve_typed_text=resolve_typed_text,
+ )
)
+
+ # The probe is caller-built (browser semantics live with the dispatcher, e.g. peeking without
+ # page recovery); page-free runs never probe.
+ finish_tool = make_finish_tool(settle_probe=None if page_free else settle_probe)
+ tools = browser_tools + (extra_tools or []) + [finish_tool]
+ base_system_prompt = PAGE_FREE_SYSTEM_PROMPT if page_free else SYSTEM_PROMPT
outcome = await run_agent_tool_loop(
llm_caller=llm_caller,
- system_prompt=SYSTEM_PROMPT + extra_system_guidance,
+ system_prompt=base_system_prompt + extra_system_guidance,
user_prompt=_build_user_prompt(goal, parameters, starting_url),
tools=tools,
max_turns=max_turns,
@@ -164,7 +195,7 @@ async def run_task_v3_agent_loop(
max_action_steps=max_action_steps,
prompt_name=prompt_name,
organization_id=organization_id,
- call_kwargs={"step": step} if step is not None else None,
+ call_kwargs=_build_call_kwargs(step, llm_caller),
should_cancel=should_cancel,
on_action_round=on_action_round,
max_tokens=max_tokens,
@@ -178,5 +209,8 @@ async def run_task_v3_agent_loop(
turns=outcome.turns,
tool_calls=outcome.tool_calls,
action_steps=outcome.action_steps,
+ no_tool_call_turns=outcome.no_tool_call_turns,
+ tool_choice_requested=settings.TASK_V3_TOOL_CHOICE_REQUIRED,
+ tool_choice_in_effect=outcome.tool_choice_in_effect,
)
return outcome
diff --git a/skyvern/forge/taskv3/loop.py b/skyvern/forge/taskv3/loop.py
index 8d5892782..1ee539751 100644
--- a/skyvern/forge/taskv3/loop.py
+++ b/skyvern/forge/taskv3/loop.py
@@ -22,6 +22,8 @@ from typing import Any, Awaitable, Callable, Literal
import structlog
+from skyvern.exceptions import SkyvernContextWindowExceededError
+
LOG = structlog.get_logger()
ToolStatus = Literal["ok", "error"]
@@ -54,6 +56,8 @@ class ToolSpec:
handler: ToolHandler
terminal: bool = False
billable: bool = False # a page-mutating browser action that meters like a step-engine action
+ recordable: bool = False # persisted as an action row (with screenshot) but not billed/budgeted
+ compactable: bool = False # a large perception result safe to elide from the transcript once superseded
def to_openai_tool(self) -> dict[str, Any]:
return {
@@ -74,7 +78,15 @@ class LoopOutcome:
turns: int = 0
tool_calls: int = 0
action_steps: int = 0
+ # Turns where the model answered with prose instead of a tool call, costing a full round trip
+ # plus the NO_TOOL_CALL_NUDGE recovery turn.
+ no_tool_call_turns: int = 0
+ # Whether tool_choice was still being sent when the run ended. Distinguishes a run that was
+ # asked to force tool calls from one where the request was degraded away mid-run.
+ tool_choice_in_effect: bool = False
billable_actions: list[str] = field(default_factory=list)
+ # Perception snapshots are compacted in place during the run, so superseded observe/get_html
+ # content is already elided here — treat as lossy if ever persisted for audit.
messages: list[dict[str, Any]] = field(default_factory=list)
@@ -143,13 +155,35 @@ def _append_skipped_tool_results(
)
-def make_finish_tool() -> ToolSpec:
+def make_finish_tool(
+ settle_probe: Callable[[], Awaitable[bool]] | None = None,
+ max_settle_deferrals: int = 2,
+) -> ToolSpec:
+ """`settle_probe` returns True when the page has finished rendering. A finish(completed) on an
+ unsettled page is deferred (bounded by `max_settle_deferrals`, then accepted) so the model
+ re-verifies against the settled state instead of a mid-render shell — delayed loads otherwise
+ produce stochastic false completions."""
+ deferrals = 0
+
async def handler(args: dict[str, Any]) -> ToolResult:
+ nonlocal deferrals
status = args.get("status")
if status not in ("completed", "failed", "terminated"):
return ToolResult.error(
f"invalid finish status: {status!r}; call finish again with status=completed|failed|terminated"
)
+ if status == "completed" and settle_probe is not None and deferrals < max_settle_deferrals:
+ try:
+ settled = await settle_probe()
+ except Exception:
+ settled = True
+ if not settled:
+ deferrals += 1
+ return ToolResult.error(
+ "the page was still rendering when you called finish. Wait for it to settle, "
+ "re-observe, confirm the goal's effect is present in the loaded content (not a "
+ "loading indicator or empty container), then finish again."
+ )
return ToolResult.ok(
content="Task attempt ended. No further actions are permitted.",
data={
@@ -179,6 +213,45 @@ def make_finish_tool() -> ToolSpec:
)
+_COMPACTED_PREFIX = "[superseded "
+
+
+def _compact_transcript(messages: list[dict[str, Any]], snapshot_indices: set[int]) -> None:
+ """Bound the persistent conversation by eliding stale perception snapshots.
+
+ The full transcript is re-sent every turn, so large perception outputs (an `observe` snapshot the
+ agent has already acted past, or a 20k-char `get_html` dump) otherwise pile up until the token
+ backstop trips on perception-heavy pages. `snapshot_indices` holds the message indices of the
+ *successful* perception results (recorded as they are appended); keep the newest of each such tool
+ and replace older ones' content with a short placeholder. Two things are deliberately protected:
+
+ - The most-recent round (results after the last assistant message) is never touched — a single turn
+ can batch several perception calls, and compaction runs *before* the model has seen that round's
+ results, so eliding any of them would drop data the model requested but never read.
+ - Only a successful snapshot is ever a candidate: a skip/error result is never recorded in
+ `snapshot_indices`, so it can neither be elided nor shadow the real snapshot and leave the agent
+ with no usable page view — regardless of content length (a verbose provider error included).
+
+ Only a `tool` message's content is shrunk, never removed, so every tool_call keeps a matching result
+ and the transcript stays valid. Eliding also drops the index, so re-running is a no-op and an elided
+ placeholder can never re-anchor as the live snapshot."""
+ if not snapshot_indices:
+ return
+ last_assistant_idx = -1
+ for i in range(len(messages) - 1, -1, -1):
+ if messages[i].get("role") == "assistant":
+ last_assistant_idx = i
+ break
+ seen: set[str] = set()
+ for i in sorted(snapshot_indices, reverse=True):
+ name = messages[i]["name"]
+ if i > last_assistant_idx or name not in seen:
+ seen.add(name) # the still-unread latest round, or the newest snapshot of this tool — keep
+ continue
+ messages[i]["content"] = f"{_COMPACTED_PREFIX}{name} output elided to bound context]"
+ snapshot_indices.discard(i)
+
+
async def run_agent_tool_loop(
*,
llm_caller: Any,
@@ -192,7 +265,7 @@ async def run_agent_tool_loop(
organization_id: str | None = None,
call_kwargs: dict[str, Any] | None = None,
should_cancel: Callable[[], Awaitable[bool]] | None = None,
- on_action_round: Callable[[list[tuple[str, dict[str, Any]]]], Awaitable[None]] | None = None,
+ on_action_round: Callable[[list[tuple[str, dict[str, Any], bool]]], Awaitable[None]] | None = None,
max_tokens: int | None = None,
deadline_seconds: float | None = None,
retryable_call_exceptions: tuple[type[BaseException], ...] = (),
@@ -209,9 +282,31 @@ async def run_agent_tool_loop(
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt},
]
+ # Indices into `messages` of successful perception results, recorded as they are appended so
+ # compaction can keep only the newest of each without inferring "real snapshot" from content size.
+ snapshot_indices: set[int] = set()
outcome: LoopOutcome | None = None
+ # Mutable for the run: a provider that rejects tool_choice rejects it every turn, so a drop
+ # made once must stick.
+ active_call_kwargs = dict(call_kwargs or {})
+
+ def _degrade_tool_choice(exc: BaseException) -> bool:
+ """Drop tool_choice and report whether the turn is worth re-issuing.
+
+ Called only when the turn is otherwise about to end the run, so the cost is one extra call
+ on a run that was already failing. A context-window overflow is excluded because dropping a
+ parameter provably cannot fix it.
+ """
+ if isinstance(exc, SkyvernContextWindowExceededError):
+ return False
+ if active_call_kwargs.pop("tool_choice", None) is None:
+ return False
+ LOG.warning("taskv3 loop retrying without tool_choice", turn=turns, exc_info=True)
+ return True
+
turns = 0
+ no_tool_call_turns = 0
total_tool_calls = 0
total_tokens = 0
billable_actions: list[str] = []
@@ -236,6 +331,9 @@ async def run_agent_tool_loop(
break
turns += 1
+ # Elide superseded perception results before re-sending the transcript, so a perception-heavy
+ # run can't balloon the context to the token backstop (the pre-compaction runaway mode).
+ _compact_transcript(messages, snapshot_indices)
llm_caller.message_history = list(messages)
# Retry only the LLM call on transient provider errors. No browser tool has run this
# turn, so re-issuing the same call is side-effect-free — unlike a whole-task retry,
@@ -252,12 +350,21 @@ async def run_agent_tool_loop(
tools=openai_tools,
use_message_history=True,
raw_response=True,
- **(call_kwargs or {}),
+ **active_call_kwargs,
)
break
except retryable_call_exceptions as exc:
call_attempt += 1
if call_attempt > max_call_retries:
+ # A provider rejecting the parameter surfaces here, not in the generic handler
+ # below: litellm's 400s subclass openai.APIError, which the LLM layer maps to
+ # the retryable type. Degrading only after the transient budget is spent keeps
+ # a passing blip from disabling the lever for the rest of the run.
+ if _degrade_tool_choice(exc):
+ # Spend the transient budget once, not once per parameter set: the degraded
+ # turn gets a single shot, which is what "last resort" is worth.
+ call_attempt = max_call_retries
+ continue
LOG.warning(
"taskv3 loop LLM call failed after retries", turn=turns, attempts=call_attempt, exc_info=True
)
@@ -266,6 +373,8 @@ async def run_agent_tool_loop(
LOG.info("taskv3 loop retrying transient LLM error", turn=turns, attempt=call_attempt)
await asyncio.sleep(call_retry_base_delay * (2 ** (call_attempt - 1)))
except Exception as exc:
+ if _degrade_tool_choice(exc):
+ continue
LOG.warning("taskv3 loop LLM call failed", turn=turns, exc_info=True)
outcome = LoopOutcome("loop_error", f"llm_call_failed: {type(exc).__name__}: {exc}")
break
@@ -290,11 +399,13 @@ async def run_agent_tool_loop(
messages.append(assistant_message)
if not tool_calls:
+ no_tool_call_turns += 1
+ LOG.info("taskv3 loop turn produced no tool call", turn=turns)
messages.append({"role": "user", "content": NO_TOOL_CALL_NUDGE})
continue
turn_did_action = False
- round_actions: list[tuple[str, dict[str, Any]]] = []
+ round_actions: list[tuple[str, dict[str, Any], bool]] = []
for idx, (tool_call_id, tool_name, args) in enumerate(tool_calls):
# Enforce the cap per tool call so one batched turn cannot overrun it, and honor a
# cancellation that arrives mid-batch before the next click/type/submit runs. Neither
@@ -329,12 +440,18 @@ async def run_agent_tool_loop(
LOG.warning("taskv3 tool handler raised", tool=tool_name, exc_info=True)
result = ToolResult.error(f"tool_error: {type(exc).__name__}: {exc}")
+ if spec is not None and spec.compactable and result.status == "ok":
+ snapshot_indices.add(len(messages)) # index this successful snapshot will occupy, pre-append
messages.append(
{"role": "tool", "tool_call_id": tool_call_id, "name": tool_name, "content": result.content}
)
- if spec is not None and spec.billable and result.status == "ok":
- billable_actions.append(tool_name)
- round_actions.append((tool_name, args))
+ if spec is not None and (spec.billable or spec.recordable):
+ # Dispatched page actions enter the round with their outcome: a failed billable round
+ # still consumed budget and must persist (else later blocks undercount the run
+ # budget); recordable tools persist for artifact parity without billing/budget.
+ round_actions.append((tool_name, args, result.status == "ok"))
+ if spec.billable and result.status == "ok":
+ billable_actions.append(tool_name)
if spec is not None and spec.terminal and result.status == "ok":
data = result.data or {}
@@ -371,6 +488,8 @@ async def run_agent_tool_loop(
outcome = LoopOutcome("loop_error", "loop exited without an outcome")
outcome.turns = turns
+ outcome.no_tool_call_turns = no_tool_call_turns
+ outcome.tool_choice_in_effect = "tool_choice" in active_call_kwargs
outcome.tool_calls = total_tool_calls
outcome.action_steps = action_steps
outcome.billable_actions = billable_actions
diff --git a/skyvern/forge/taskv3/preflight.py b/skyvern/forge/taskv3/preflight.py
index d0348cc34..b0d5f950b 100644
--- a/skyvern/forge/taskv3/preflight.py
+++ b/skyvern/forge/taskv3/preflight.py
@@ -25,6 +25,7 @@ from skyvern.webeye.actions.actions import (
Action,
ClickAction,
GotoUrlAction,
+ HoverAction,
InputTextAction,
KeypressAction,
SelectOption,
@@ -38,7 +39,7 @@ LOG = structlog.get_logger()
# `_build_action` maps. This is the single source of truth for which tool handlers get wrapped;
# `build_browser_tools` imports it rather than keeping a second list that can drift.
PREFLIGHT_TOOL_NAMES = frozenset(
- {"click", "type", "select_combobox", "select_option", "press_key", "file_upload", "navigate"}
+ {"click", "hover", "type", "select_combobox", "select_option", "press_key", "file_upload", "navigate"}
)
@@ -46,6 +47,8 @@ def _build_action(tool_name: str, args: dict[str, Any]) -> Action | None:
selector = str(args.get("selector") or "")
if tool_name == "click":
return ClickAction(element_id=selector)
+ if tool_name == "hover":
+ return HoverAction(element_id=selector)
if tool_name == "type":
return InputTextAction(element_id=selector, text=str(args.get("text", "")))
if tool_name == "select_combobox":
diff --git a/skyvern/forge/taskv3/tools.py b/skyvern/forge/taskv3/tools.py
index 52db58b49..257be66ad 100644
--- a/skyvern/forge/taskv3/tools.py
+++ b/skyvern/forge/taskv3/tools.py
@@ -5,8 +5,9 @@ the task/prompt ecosystem (no LLM-backed observe/act/extract). That is the whole
the agent perceives via a raw DOM snapshot and acts by selector, so the only LLM in the
loop is the agent's own persistent conversation.
-`build_browser_tools(page, ...)` returns `ToolSpec`s bound to one Playwright page, ready
-to hand to `run_agent_tool_loop` alongside `make_finish_tool()`.
+`build_browser_tools(page_provider, ...)` returns `ToolSpec`s that resolve their page via
+`page_provider` on every call (not a page bound once), ready to hand to `run_agent_tool_loop`
+alongside `make_finish_tool()`.
"""
from __future__ import annotations
@@ -22,6 +23,12 @@ from skyvern.forge.taskv3.preflight import PREFLIGHT_TOOL_NAMES, preflight_tool_
LOG = structlog.get_logger()
+# Resolved fresh per tool call rather than a page bound once, so a click that opens a new
+# tab/popup is followed on the next call instead of leaving the loop stuck on a stale page.
+PageProvider = Callable[[], Awaitable[Any]]
+
+PAGE_UNAVAILABLE_ERROR = "browser page unavailable"
+
# ARIA combobox signals — used by observe() only to add a hint that a field is a typeahead. This is a
# nudge for the model, not load-bearing: type() handles typeaheads behaviorally (see _FIND_SUGGESTION_JS),
# so a field with no ARIA (a plain <input> backed by a custom dropdown) is still handled correctly.
@@ -224,20 +231,50 @@ def _obj(properties: dict[str, Any], required: list[str] | None = None) -> dict[
def build_browser_tools(
- page: Any,
+ page_provider: PageProvider,
*,
downloads_dir: str | None = None,
organization_id: str | None = None,
+ resolve_typed_text: Callable[[str], Any] | None = None,
) -> list[ToolSpec]:
- """Raw-browser tools bound to `page` (a Playwright Page)."""
+ """Raw-browser tools that resolve their page from `page_provider` on every call."""
- async def _url() -> str:
+ def _resolve_text(text: str) -> str:
+ # Workflow credential values reach the model only as secret placeholders; resolve them to the
+ # real value at fill time (the same boundary the step engine uses). Fail open to the literal.
+ if resolve_typed_text is None:
+ return text
+ try:
+ resolved = resolve_typed_text(text)
+ except Exception:
+ LOG.warning("taskv3 typed-text resolution failed; typing the literal text", exc_info=True)
+ return text
+ return resolved if isinstance(resolved, str) else text
+
+ # INVARIANT: holds at most one page, written only by the preflight wrapper immediately before
+ # its handler runs and consumed by that handler's single _resolve_page call; the wrapper clears
+ # it in a finally. Relies on the loop dispatching tool calls sequentially — a concurrent
+ # dispatcher or a twice-resolving handler must replace this handoff, not reuse it.
+ _prefetched_page: list[Any] = []
+
+ async def _resolve_page() -> tuple[Any, ToolResult | None]:
+ # Single-use handoff from the preflight wrapper so a preflighted call resolves the page
+ # once, not twice (each resolution is a must_get_working_page with its recovery path).
+ page = _prefetched_page.pop() if _prefetched_page else await page_provider()
+ if page is None:
+ return None, ToolResult.error(PAGE_UNAVAILABLE_ERROR)
+ return page, None
+
+ async def _url(page: Any) -> str:
try:
return page.url
except Exception:
return ""
async def observe(_args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
# Bound the one perception call so a wedged page can't hang the turn indefinitely.
raw = await asyncio.wait_for(page.evaluate(_OBSERVE_JS), timeout=30)
data = json.loads(raw) if isinstance(raw, str) else raw
@@ -264,6 +301,9 @@ def build_browser_tools(
return ToolResult.ok("\n".join(lines), data={"count": len(elements)})
async def get_html(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args.get("selector")
if selector:
el = await page.query_selector(selector)
@@ -275,11 +315,22 @@ def build_browser_tools(
return ToolResult.ok(html[:20000])
async def click(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args["selector"]
await page.click(selector, timeout=15000)
- return ToolResult.ok(f"clicked {selector} — now at {await _url()}")
+ return ToolResult.ok(f"clicked {selector} — now at {await _url(page)}")
- async def _commit_typeahead(selector: str, value: str, rounds: int) -> tuple[str | None, str | None]:
+ async def hover(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
+ selector = args["selector"]
+ await page.hover(selector, timeout=15000)
+ return ToolResult.ok(f"hovered {selector}")
+
+ async def _commit_typeahead(page: Any, selector: str, value: str, rounds: int) -> tuple[str | None, str | None]:
# Poll for the suggestion list rendered IN REACTION to the value already typed into `selector`,
# click the best match, and verify the field committed. Site-agnostic (see _FIND_SUGGESTION_JS).
# Returns (committed_value, suggestion_text): suggestion_text is None when no suggestion ever
@@ -328,7 +379,7 @@ def build_browser_tools(
committed = ""
return (committed or None), best_txt
- async def _type_and_commit(selector: str, value: str, rounds: int) -> tuple[str | None, str | None]:
+ async def _type_and_commit(page: Any, selector: str, value: str, rounds: int) -> tuple[str | None, str | None]:
# Keystroke-type (so a widget's async suggestion fetch fires on real key events). Snapshot the
# visible DOM just before typing so the finder treats only NEW/reacting nodes as suggestions —
# static page text that merely shares a word with the value can't be mistaken for one.
@@ -346,7 +397,7 @@ def build_browser_tools(
# text, so don't run the finder ungated (it could click unrelated content) — leave the typed
# value and let the caller re-observe.
return None, None
- return await _commit_typeahead(selector, value, rounds)
+ return await _commit_typeahead(page, selector, value, rounds)
# Input kinds that are never typeaheads — skip the suggestion probe (and its latency) for these.
# `textarea` is included: free-text boxes never render a typeahead and would just pay the probe tax.
@@ -368,7 +419,7 @@ def build_browser_tools(
}
)
- async def _field_type(selector: str) -> str:
+ async def _field_type(page: Any, selector: str) -> str:
try:
return (
await page.eval_on_selector(
@@ -380,8 +431,11 @@ def build_browser_tools(
return "text"
async def type_text(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args["selector"]
- text = args.get("text", "")
+ text = _resolve_text(args.get("text", ""))
press_enter = args.get("press_enter")
clear = args.get("clear", True)
# A typeahead silently rejects raw typed text — it only accepts a picked suggestion — and the
@@ -389,10 +443,10 @@ def build_browser_tools(
# field, check whether the page REACTED with a suggestion list and, if so, commit the best match
# here. Detection is behavioral (no per-site rules), so this holds across ATSes; non-text inputs
# and append/enter typing skip it and fill normally (fast path, no polling).
- if text and clear and not press_enter and await _field_type(selector) not in _NON_TYPEAHEAD_TYPES:
+ if text and clear and not press_enter and await _field_type(page, selector) not in _NON_TYPEAHEAD_TYPES:
# keystroke-type (via _type_and_commit) so a widget that fetches suggestions on key events —
# not just on a single `input` from fill — still surfaces them, then commit the best match.
- committed, opt_txt = await _type_and_commit(selector, text, rounds=3)
+ committed, opt_txt = await _type_and_commit(page, selector, text, rounds=3)
if opt_txt and committed:
return ToolResult.ok(
f"typed into {selector}; it is a typeahead — selected {opt_txt!r} (committed value: {committed!r})"
@@ -415,6 +469,9 @@ def build_browser_tools(
return ToolResult.ok(f"typed into {selector}")
async def select_option(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args["selector"]
if args.get("label") is not None:
await page.select_option(selector, label=args["label"], timeout=15000)
@@ -423,6 +480,9 @@ def build_browser_tools(
return ToolResult.ok(f"selected on {selector}")
async def press_key(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
key = args["key"]
selector = args.get("selector")
if selector:
@@ -432,6 +492,9 @@ def build_browser_tools(
return ToolResult.ok(f"pressed {key}")
async def scroll(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args.get("selector")
if selector:
el = await page.query_selector(selector)
@@ -445,6 +508,9 @@ def build_browser_tools(
return ToolResult.ok(f"scrolled {amount}px")
async def wait(args: dict[str, Any]) -> ToolResult:
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args.get("selector")
if selector:
state = args.get("state", "visible")
@@ -458,32 +524,41 @@ def build_browser_tools(
async def navigate(args: dict[str, Any]) -> ToolResult:
from skyvern.utils.url_validators import validate_fetch_url
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
url = await asyncio.to_thread(validate_fetch_url, args["url"])
await page.goto(url, timeout=60000, wait_until="load")
- return ToolResult.ok(f"navigated to {await _url()}")
+ return ToolResult.ok(f"navigated to {await _url(page)}")
async def file_upload(args: dict[str, Any]) -> ToolResult:
# Lazy import: keeps this module importable for unit tests without the full forge/storage graph.
from skyvern.forge.sdk.api.files import download_file
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args["selector"]
- source = args["file"]
+ source = _resolve_text(args["file"])
local_path = await download_file(source, output_dir=downloads_dir, organization_id=organization_id)
paths = [local_path]
el = await page.query_selector(selector)
if el is None:
return ToolResult.error(f"no file input for selector {selector!r}")
await el.set_input_files(paths)
- return ToolResult.ok(f"uploaded {paths} to {selector}")
+ return ToolResult.ok(f"uploaded 1 file to {selector}")
async def select_combobox(args: dict[str, Any]) -> ToolResult:
# Explicit typeahead fill (type() also drives this automatically): type the value, WAIT for the
# async suggestion list, pick the best-matching suggestion, and VERIFY the field committed. Fails
# loudly if nothing matches rather than leaving raw typed text the widget won't accept as a valid
# selection (a false "filled" — the failure mode this exists to prevent).
+ page, error = await _resolve_page()
+ if error is not None:
+ return error
selector = args["selector"]
- value = args["value"]
- committed, opt_txt = await _type_and_commit(selector, value, rounds=8)
+ value = _resolve_text(args["value"])
+ committed, opt_txt = await _type_and_commit(page, selector, value, rounds=8)
if opt_txt is None:
return ToolResult.error(
f"no autocomplete suggestion matched {value!r} for {selector}; the field is NOT filled "
@@ -509,6 +584,12 @@ def build_browser_tools(
_spec(
"click", "Click an element by CSS selector.", _obj({"selector": {"type": "string"}}, ["selector"]), click
),
+ _spec(
+ "hover",
+ "Hover over an element by CSS selector (e.g. to open a hover menu).",
+ _obj({"selector": {"type": "string"}}, ["selector"]),
+ hover,
+ ),
_spec(
"type",
"Type text into an input/textarea by CSS selector (clears first by default).",
@@ -580,18 +661,41 @@ def build_browser_tools(
),
]
for _tool_spec in tools:
- if _tool_spec.name in ("click", "type", "select_option", "select_combobox", "press_key", "file_upload"):
+ if _tool_spec.name in (
+ "click",
+ "hover",
+ "type",
+ "select_option",
+ "select_combobox",
+ "press_key",
+ "file_upload",
+ ):
_tool_spec.billable = True
+ if _tool_spec.name in ("observe", "get_html"):
+ # Large perception dumps: only the latest snapshot is relevant, so let the loop elide older
+ # ones from the re-sent transcript (bounds context on perception-heavy pages).
+ _tool_spec.compactable = True
if _tool_spec.name in PREFLIGHT_TOOL_NAMES:
- _tool_spec.handler = _with_preflight(_tool_spec.name, _tool_spec.handler, page)
+ _tool_spec.handler = _with_preflight(_tool_spec.name, _tool_spec.handler, page_provider, _prefetched_page)
return tools
def _with_preflight(
- name: str, handler: Callable[[dict[str, Any]], Awaitable[ToolResult]], page: Any
+ name: str,
+ handler: Callable[[dict[str, Any]], Awaitable[ToolResult]],
+ page_provider: PageProvider,
+ prefetched_page: list[Any] | None = None,
) -> Callable[[dict[str, Any]], Awaitable[ToolResult]]:
async def wrapped(args: dict[str, Any]) -> ToolResult:
- preflight_tool_action(name, args, page)
- return await handler(args)
+ page = await page_provider()
+ if page is not None:
+ preflight_tool_action(name, args, page)
+ if prefetched_page is not None:
+ prefetched_page.append(page)
+ try:
+ return await handler(args)
+ finally:
+ if prefetched_page is not None:
+ prefetched_page.clear()
return wrapped
diff --git a/skyvern/library/skyvern.py b/skyvern/library/skyvern.py
index c3a6e8748..79d96b1d3 100644
--- a/skyvern/library/skyvern.py
+++ b/skyvern/library/skyvern.py
@@ -634,7 +634,7 @@ class Skyvern(AsyncSkyvern):
Args:
timeout: Timeout in minutes for the session. Timeout is applied after the session is started.
- Must be at least 5; values above 240 are capped at 240. Defaults to 60.
+ Must be between 5 and 240; values above 240 are rejected with a 400. Defaults to 60.
proxy_location: Geographic proxy location to route the browser traffic through.
This is only available in Skyvern Cloud.
extensions: Browser extensions to install in the session.
@@ -676,7 +676,7 @@ class Skyvern(AsyncSkyvern):
Args:
timeout: Timeout in minutes for the session. Timeout is applied after the session is started.
- Must be at least 5; values above 240 are capped at 240. Defaults to 60. Only used when creating a new session.
+ Must be between 5 and 240; values above 240 are rejected with a 400. Defaults to 60. Only used when creating a new session.
proxy_location: Geographic proxy location to route the browser traffic through.
This is only available in Skyvern Cloud. Only used when creating a new session.
diff --git a/skyvern/schemas/browser_session_timeouts.py b/skyvern/schemas/browser_session_timeouts.py
index a5a8d85b0..813c94a01 100644
--- a/skyvern/schemas/browser_session_timeouts.py
+++ b/skyvern/schemas/browser_session_timeouts.py
@@ -12,6 +12,10 @@ MAX_TIMEOUT = 60 * 4 # 4 hours
MAX_LIFETIME_SECONDS = MAX_TIMEOUT * 60
DEFAULT_TIMEOUT = 60
+MAX_TIMEOUT_EXCEEDED_MESSAGE = (
+ "Longer browser durations are available on our enterprise plan, please contact [email protected]"
+)
+
def seconds_until_expiry(
*,
diff --git a/skyvern/schemas/browser_sessions.py b/skyvern/schemas/browser_sessions.py
index ecf023227..df364b47a 100644
--- a/skyvern/schemas/browser_sessions.py
+++ b/skyvern/schemas/browser_sessions.py
@@ -24,18 +24,14 @@ class CreateBrowserSessionRequest(BaseModel):
return value
return validate_url(value)
+ # No le bound: the route rejects values above MAX_TIMEOUT with a 400 and an
+ # enterprise-contact message instead of pydantic's 422.
timeout: int | None = Field(
default=DEFAULT_TIMEOUT,
- description=f"Timeout in minutes for the session. Timeout is applied after the session is started. Must be at least {MIN_TIMEOUT}; values above {MAX_TIMEOUT} are capped at {MAX_TIMEOUT}. Defaults to {DEFAULT_TIMEOUT}.",
+ description=f"Timeout in minutes for the session. Timeout is applied after the session is started. Must be between {MIN_TIMEOUT} and {MAX_TIMEOUT}. Defaults to {DEFAULT_TIMEOUT}.",
ge=MIN_TIMEOUT,
)
- @field_validator("timeout")
- @classmethod
- def clamp_timeout_to_max(cls, timeout: int | None) -> int | None:
- # Clamped rather than rejected so callers still sending the old 24h ceiling keep working.
- return None if timeout is None else min(timeout, MAX_TIMEOUT)
-
proxy_location: ProxyLocationInput = Field(
default=None,
description=PROXY_LOCATION_DOC_STRING + " Can also be a GeoTarget object for granular city/state targeting: "
diff --git a/skyvern/schemas/workflows.py b/skyvern/schemas/workflows.py
index b402a7dcc..4df44eb74 100644
--- a/skyvern/schemas/workflows.py
+++ b/skyvern/schemas/workflows.py
@@ -1142,9 +1142,11 @@ class PDFParserBlockYAML(BlockYAML):
class ValidationBlockYAML(BlockYAML):
block_type: Literal[BlockType.VALIDATION] = BlockType.VALIDATION # type: ignore
+ engine: RunEngine = RunEngine.skyvern_v1
complete_criterion: str | None = None
terminate_criterion: str | None = None
error_code_mapping: dict[str, str] | None = None
+ max_steps_per_run: int | None = None
parameter_keys: list[str] | None = None
disable_cache: bool = False
without_page_information: bool = False
@@ -1161,6 +1163,7 @@ class ActionBlockYAML(BlockYAML):
ai_fallback: AIFallbackMode = AIFallbackMode.FALLBACK
error_code_mapping: dict[str, str] | None = None
max_retries: int = 0
+ max_steps_per_run: int | None = None
parameter_keys: list[str] | None = None
complete_on_download: bool = False
download_suffix: str | None = (
diff --git a/skyvern/services/script_service.py b/skyvern/services/script_service.py
index 6287c2cfc..1e17ac511 100644
--- a/skyvern/services/script_service.py
+++ b/skyvern/services/script_service.py
@@ -72,6 +72,7 @@ from skyvern.forge.sdk.workflow.models.block import (
CURRENT_DATE_FORMAT,
DEFAULT_MAX_LOOP_ITERATIONS,
ActionBlock,
+ BaseTaskBlock,
CodeBlock,
ExtractionBlock,
FileDownloadBlock,
@@ -91,6 +92,7 @@ from skyvern.forge.sdk.workflow.models.block import (
ValidationBlock,
WhileLoopBlock,
WorkflowTriggerBlock,
+ get_all_blocks,
)
from skyvern.forge.sdk.workflow.models.parameter import (
PARAMETER_TYPE,
@@ -1310,6 +1312,15 @@ async def _detect_user_defined_errors(
return []
+def _resolve_original_block_engine(cache_key: str, workflow: Workflow) -> RunEngine | None:
+ # Recursive: a cached block inside a for/while loop must keep its engine too (labels are
+ # validated globally unique, so the first match is the block).
+ for block in get_all_blocks(workflow.workflow_definition.blocks):
+ if block.label == cache_key:
+ return block.engine if isinstance(block, BaseTaskBlock) else None
+ return None
+
+
async def _fallback_to_ai_run(
block_type: BlockType,
cache_key: str,
@@ -1551,6 +1562,28 @@ async def _fallback_to_ai_run(
step_id=script_step_id,
)
+ # Inherit the original block's engine when the caller left it at default; fail open to v1 on any miss.
+ if engine == RunEngine.skyvern_v1:
+ try:
+ resolved_engine = _resolve_original_block_engine(cache_key, workflow)
+ if resolved_engine is not None and resolved_engine != RunEngine.skyvern_v1:
+ engine = resolved_engine
+ LOG.debug(
+ "Resolved original block engine for AI fallback",
+ cache_key=cache_key,
+ engine=engine.value,
+ workflow_id=workflow_id,
+ workflow_run_id=workflow_run_id,
+ )
+ except Exception:
+ LOG.debug(
+ "Failed to resolve original block engine for AI fallback, defaulting to v1",
+ cache_key=cache_key,
+ workflow_id=workflow_id,
+ workflow_run_id=workflow_run_id,
+ exc_info=True,
+ )
+
task_block = TaskBlock(
label=cache_key,
url=task.url,
@@ -1576,6 +1609,9 @@ async def _fallback_to_ai_run(
task=task,
step=ai_step,
task_block=task_block,
+ # The dispatch gate reads the engine PARAM, not task_block.engine — without this the
+ # inherited engine is inert and every fallback runs the default.
+ engine=engine,
)
# update workflow run to indicate that there's a script run
diff --git a/tests/smoke_tests/data/complex_context_screenshot1.png b/tests/smoke_tests/data/complex_context_screenshot1.png
deleted file mode 100644
index 07d35058d..000000000
Binary files a/tests/smoke_tests/data/complex_context_screenshot1.png and /dev/null differ
diff --git a/tests/smoke_tests/data/complex_context_screenshot2.png b/tests/smoke_tests/data/complex_context_screenshot2.png
deleted file mode 100644
index 5c29fad70..000000000
Binary files a/tests/smoke_tests/data/complex_context_screenshot2.png and /dev/null differ
diff --git a/tests/smoke_tests/data/complex_element_tree.json b/tests/smoke_tests/data/complex_element_tree.json
deleted file mode 100644
index b5dd0f6f4..000000000
--- a/tests/smoke_tests/data/complex_element_tree.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"id": 0, "marker": "AA", "tagName": "button", "attributes": {"id": "_1a1", "name": "_1a1", "value": "x", "type": "submit", "class": "wc-button wc-linkbutton", "unique_id": "0"}, "text": "Logout", "children": []}, {"id": 1, "marker": "AF", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a3a1", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Passport details section", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0045.aspx", "target": "help_elp_h0045", "rel": "noopener noreferrer", "unique_id": "1"}, "text": "\u200b", "children": []}, {"id": 2, "marker": "AK", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a6b1a1a0_input", "id": "_2a0j0a0a0e0a0a2a6b1a0a", "class": "wc-label", "unique_id": "2"}, "text": "Family name", "children": []}, {"id": 3, "marker": "AS", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a6b1a1a0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a6b1a1a0", "value": "", "size": "50", "maxlength": "100", "style": "", "unique_id": "3"}, "text": "", "children": []}, {"id": 4, "marker": "AW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a6b1a1a1", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Family name", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0010.aspx", "target": "help_elp_h0010", "rel": "noopener noreferrer", "unique_id": "4"}, "text": "\u200b", "children": []}, {"id": 5, "marker": "FA", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a6b2a1a0_input", "id": "_2a0j0a0a0e0a0a2a6b2a0a", "class": "wc-label", "unique_id": "5"}, "text": "Given names", "children": []}, {"id": 6, "marker": "FF", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a6b2a1a0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a6b2a1a0", "value": "", "size": "50", "maxlength": "100", "style": "", "unique_id": "6"}, "text": "", "children": []}, {"id": 7, "marker": "FK", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a6b2a1a1", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Given names", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0010.aspx", "target": "help_elp_h0010", "rel": "noopener noreferrer", "unique_id": "7"}, "text": "\u200b", "children": []}, {"id": 8, "marker": "FS", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "8"}, "text": "Female", "children": [{"id": 9, "marker": "FS", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a6c0b0", "value": "F", "id": "d1966273077e151", "style": "", "unique_id": "9"}, "text": "", "children": []}]}, {"id": 10, "marker": "H", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "10"}, "text": "Male", "children": [{"id": 11, "marker": "H", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a6c0b0", "value": "M", "id": "d1966273077e153", "style": "", "unique_id": "11"}, "text": "", "children": []}]}, {"id": 12, "marker": "HA", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "12"}, "text": "Other", "children": [{"id": 13, "marker": "HA", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a6c0b0", "value": "U", "id": "d1966273077e155", "style": "", "unique_id": "13"}, "text": "", "children": []}]}, {"id": 14, "marker": "HF", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a6d0b0_input", "id": "_2a0j0a0a0e0a0a2a6d0a0", "class": "wc-label", "unique_id": "14"}, "text": "Date of birth", "children": []}, {"id": 15, "marker": "HK", "tagName": "div", "attributes": {"id": "_2a0j0a0a0e0a0a2a6d0b0", "class": "wc-datefield wc_datefield_partial wc-input-wrapper ELP-F0690", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "false", "unique_id": "15"}, "text": "", "children": [{"id": 16, "marker": "HK", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a6d0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a6d0b0", "value": "", "autocomplete": "off", "style": "", "unique_id": "16"}, "text": "", "children": []}, {"id": 17, "marker": "HK", "tagName": "button", "attributes": {"aria-hidden": "true", "class": "wc_wdf_cal wc-invite", "tabindex": "-1", "type": "button", "value": "_2a0j0a0a0e0a0a2a6d0b0_input", "unique_id": "17"}, "text": "", "children": []}]}, {"id": 18, "marker": "HS", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a7b0b0_input", "id": "_2a0j0a0a0e0a0a2a7b0a0", "class": "wc-label", "unique_id": "18"}, "text": "Passport number", "children": []}, {"id": 19, "marker": "KA", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a7b0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a7b0b0", "value": "", "size": "14", "maxlength": "14", "style": "", "unique_id": "19"}, "text": "", "children": []}, {"id": 20, "marker": "KF", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a7c0b0_input", "id": "_2a0j0a0a0e0a0a2a7c0a0", "class": "wc-label", "unique_id": "20"}, "text": "Country of passport", "children": []}, {"id": 21, "marker": "KK", "tagName": "select", "attributes": {"id": "_2a0j0a0a0e0a0a2a7c0b0_input", "name": "_2a0j0a0a0e0a0a2a7c0b0", "unique_id": "21", "options": [{"optionIndex": 0, "text": ""}, {"optionIndex": 1, "text": "AFGHANISTAN - AFG"}, {"optionIndex": 2, "text": "ALBANIA - ALB"}, {"optionIndex": 3, "text": "ALGERIA - DZA"}, {"optionIndex": 4, "text": "AMERICAN SAMOA - ASM"}, {"optionIndex": 5, "text": "ANDORRA - AND"}, {"optionIndex": 6, "text": "ANGOLA - AGO"}, {"optionIndex": 7, "text": "ANGUILLA - AIA"}, {"optionIndex": 8, "text": "ANTIGUA AND BARBUDA - ATG"}, {"optionIndex": 9, "text": "ARGENTINA - ARG"}, {"optionIndex": 10, "text": "ARMENIA - ARM"}, {"optionIndex": 11, "text": "ARUBA - ABW"}, {"optionIndex": 12, "text": "AUSTRALIA - AUS"}, {"optionIndex": 13, "text": "AUSTRIA - AUT"}, {"optionIndex": 14, "text": "AZERBAIJAN - AZE"}, {"optionIndex": 15, "text": "BAHAMAS - BHS"}, {"optionIndex": 16, "text": "BAHRAIN - BHR"}, {"optionIndex": 17, "text": "BANGLADESH - BGD"}, {"optionIndex": 18, "text": "BARBADOS - BRB"}, {"optionIndex": 19, "text": "BELARUS - BLR"}, {"optionIndex": 20, "text": "BELGIUM - BEL"}, {"optionIndex": 21, "text": "BELIZE - BLZ"}, {"optionIndex": 22, "text": "BENIN - BEN"}, {"optionIndex": 23, "text": "BERMUDA - BMU"}, {"optionIndex": 24, "text": "BHUTAN - BTN"}, {"optionIndex": 25, "text": "BOLIVIA - BOL"}, {"optionIndex": 26, "text": "BONAIRE, SINT EUSTATIUS AND SABA - BES"}, {"optionIndex": 27, "text": "BOSNIA AND HERZEGOVINA - BIH"}, {"optionIndex": 28, "text": "BOTSWANA - BWA"}, {"optionIndex": 29, "text": "BRAZIL - BRA"}, {"optionIndex": 30, "text": "BRUNEI DARUSSALAM - BRN"}, {"optionIndex": 31, "text": "BULGARIA - BGR"}, {"optionIndex": 32, "text": "BURKINA FASO - BFA"}, {"optionIndex": 33, "text": "MYANMAR - MMR"}, {"optionIndex": 34, "text": "BURUNDI - BDI"}, {"optionIndex": 35, "text": "CABO VERDE - CPV"}, {"optionIndex": 36, "text": "CAMBODIA - KHM"}, {"optionIndex": 37, "text": "CAMEROON - CMR"}, {"optionIndex": 38, "text": "CANADA - CAN"}, {"optionIndex": 39, "text": "CAYMAN ISLANDS - CYM"}, {"optionIndex": 40, "text": "CENTRAL AFRICAN REPUBLIC - CAF"}, {"optionIndex": 41, "text": "CHAD - TCD"}, {"optionIndex": 42, "text": "CHILE - CHL"}, {"optionIndex": 43, "text": "CHINA - CHN"}, {"optionIndex": 44, "text": "COLOMBIA - COL"}, {"optionIndex": 45, "text": "COMOROS - COM"}, {"optionIndex": 46, "text": "CONGO - COG"}, {"optionIndex": 47, "text": "CONGO, DEMOCRATIC REPUBLIC OF THE - COD"}, {"optionIndex": 48, "text": "COOK ISLANDS - COK"}, {"optionIndex": 49, "text": "COSTA RICA - CRI"}, {"optionIndex": 50, "text": "COTE D'IVOIRE - CIV"}, {"optionIndex": 51, "text": "CROATIA - HRV"}, {"optionIndex": 52, "text": "CUBA - CUB"}, {"optionIndex": 53, "text": "CURACAO - CUW"}, {"optionIndex": 54, "text": "CYPRUS - CYP"}, {"optionIndex": 55, "text": "CZECHIA (CZECH REP) - CZE"}, {"optionIndex": 56, "text": "DENMARK - DNK"}, {"optionIndex": 57, "text": "DJIBOUTI - DJI"}, {"optionIndex": 58, "text": "DOMINICA - DMA"}, {"optionIndex": 59, "text": "DOMINICAN REPUBLIC - DOM"}, {"optionIndex": 60, "text": "EAST TIMOR - TMP"}, {"optionIndex": 61, "text": "ECUADOR - ECU"}, {"optionIndex": 62, "text": "EGYPT - EGY"}, {"optionIndex": 63, "text": "EL SALVADOR - SLV"}, {"optionIndex": 64, "text": "EQUATORIAL GUINEA - GNQ"}, {"optionIndex": 65, "text": "ERITREA - ERI"}, {"optionIndex": 66, "text": "ESTONIA - EST"}, {"optionIndex": 67, "text": "ESWATINI - SWZ"}, {"optionIndex": 68, "text": "ETHIOPIA - ETH"}, {"optionIndex": 69, "text": "FALKLAND ISLANDS (MALVINAS) - FLK"}, {"optionIndex": 70, "text": "FIJI - FJI"}, {"optionIndex": 71, "text": "FINLAND - FIN"}, {"optionIndex": 72, "text": "FRANCE - FRA"}, {"optionIndex": 73, "text": "FRENCH GUIANA - GUF"}, {"optionIndex": 74, "text": "FRENCH POLYNESIA - PYF"}, {"optionIndex": 75, "text": "GABON - GAB"}, {"optionIndex": 76, "text": "GAMBIA - GMB"}, {"optionIndex": 77, "text": "GEORGIA - GEO"}, {"optionIndex": 78, "text": "GERMANY - D"}, {"optionIndex": 79, "text": "GHANA - GHA"}, {"optionIndex": 80, "text": "GIBRALTAR - GIB"}, {"optionIndex": 81, "text": "GREECE - GRC"}, {"optionIndex": 82, "text": "GREENLAND - GRL"}, {"optionIndex": 83, "text": "GRENADA - GRD"}, {"optionIndex": 84, "text": "GUADELOUPE - GLP"}, {"optionIndex": 85, "text": "GUAM - GUM"}, {"optionIndex": 86, "text": "GUATEMALA - GTM"}, {"optionIndex": 87, "text": "GUINEA - GIN"}, {"optionIndex": 88, "text": "GUINEA-BISSAU - GNB"}, {"optionIndex": 89, "text": "GUYANA - GUY"}, {"optionIndex": 90, "text": "HAITI - HTI"}, {"optionIndex": 91, "text": "HONDURAS - HND"}, {"optionIndex": 92, "text": "HONG KONG SAR - HKG"}, {"optionIndex": 93, "text": "HUNGARY - HUN"}, {"optionIndex": 94, "text": "ICELAND - ISL"}, {"optionIndex": 95, "text": "INDIA - IND"}, {"optionIndex": 96, "text": "INDONESIA - IDN"}, {"optionIndex": 97, "text": "IRAN, ISLAMIC REPUBLIC OF - IRN"}, {"optionIndex": 98, "text": "IRAQ - IRQ"}, {"optionIndex": 99, "text": "IRELAND - IRL"}, {"optionIndex": 100, "text": "ISRAEL - ISR"}, {"optionIndex": 101, "text": "ITALY - ITA"}, {"optionIndex": 102, "text": "JAMAICA - JAM"}, {"optionIndex": 103, "text": "JAPAN - JPN"}, {"optionIndex": 104, "text": "JORDAN - JOR"}, {"optionIndex": 105, "text": "KAZAKHSTAN - KAZ"}, {"optionIndex": 106, "text": "KENYA - KEN"}, {"optionIndex": 107, "text": "KIRIBATI - KIR"}, {"optionIndex": 108, "text": "KOREA, DEMOCRATIC PEOPLES REPUBLIC OF (NORTH) - PRK"}, {"optionIndex": 109, "text": "KOREA, REPUBLIC OF (SOUTH) - KOR"}, {"optionIndex": 110, "text": "KOSOVO - RKS"}, {"optionIndex": 111, "text": "KUWAIT - KWT"}, {"optionIndex": 112, "text": "KYRGYZSTAN - KGZ"}, {"optionIndex": 113, "text": "LAO PEOPLE'S DEMOCRATIC REPUBLIC - LAO"}, {"optionIndex": 114, "text": "LATVIA - LVA"}, {"optionIndex": 115, "text": "LEBANON - LBN"}, {"optionIndex": 116, "text": "LESOTHO - LSO"}, {"optionIndex": 117, "text": "LIBERIA - LBR"}, {"optionIndex": 118, "text": "LIBYA - LBY"}, {"optionIndex": 119, "text": "LIECHTENSTEIN - LIE"}, {"optionIndex": 120, "text": "LITHUANIA - LTU"}, {"optionIndex": 121, "text": "LUXEMBOURG - LUX"}, {"optionIndex": 122, "text": "MACAU SAR - MAC"}, {"optionIndex": 123, "text": "MADAGASCAR - MDG"}, {"optionIndex": 124, "text": "MALAWI - MWI"}, {"optionIndex": 125, "text": "MALAYSIA - MYS"}, {"optionIndex": 126, "text": "MALDIVES - MDV"}, {"optionIndex": 127, "text": "MALI - MLI"}, {"optionIndex": 128, "text": "MALTA - MLT"}, {"optionIndex": 129, "text": "MARSHALL ISLANDS - MHL"}, {"optionIndex": 130, "text": "MARTINIQUE - MTQ"}, {"optionIndex": 131, "text": "MAURITANIA - MRT"}, {"optionIndex": 132, "text": "MAURITIUS - MUS"}, {"optionIndex": 133, "text": "MEXICO - MEX"}, {"optionIndex": 134, "text": "MICRONESIA, FEDERATED STATES OF - FSM"}, {"optionIndex": 135, "text": "MOLDOVA, REPUBLIC OF - MDA"}, {"optionIndex": 136, "text": "MONACO - MCO"}, {"optionIndex": 137, "text": "MONGOLIA - MNG"}, {"optionIndex": 138, "text": "MONTENEGRO - MNE"}, {"optionIndex": 139, "text": "MONTSERRAT - MSR"}, {"optionIndex": 140, "text": "MOROCCO - MAR"}, {"optionIndex": 141, "text": "MOZAMBIQUE - MOZ"}, {"optionIndex": 142, "text": "NAMIBIA - NAM"}, {"optionIndex": 143, "text": "NAURU - NRU"}, {"optionIndex": 144, "text": "NEPAL - NPL"}, {"optionIndex": 145, "text": "NETHERLANDS - NLD"}, {"optionIndex": 146, "text": "NETHERLANDS ANTILLES - ANT"}, {"optionIndex": 147, "text": "NEW CALEDONIA - NCL"}, {"optionIndex": 148, "text": "NEW ZEALAND - NZL"}, {"optionIndex": 149, "text": "NICARAGUA - NIC"}, {"optionIndex": 150, "text": "NIGER - NER"}, {"optionIndex": 151, "text": "NIGERIA - NGA"}, {"optionIndex": 152, "text": "NIUE - NIU"}, {"optionIndex": 153, "text": "NORTH MACEDONIA - MKD"}, {"optionIndex": 154, "text": "NORWAY - NOR"}, {"optionIndex": 155, "text": "OMAN - OMN"}, {"optionIndex": 156, "text": "PAKISTAN - PAK"}, {"optionIndex": 157, "text": "PALAU - PLW"}, {"optionIndex": 158, "text": "PALESTINIAN AUTHORITY - PSE"}, {"optionIndex": 159, "text": "PANAMA - PAN"}, {"optionIndex": 160, "text": "PAPUA NEW GUINEA - PNG"}, {"optionIndex": 161, "text": "PARAGUAY - PRY"}, {"optionIndex": 162, "text": "PERU - PER"}, {"optionIndex": 163, "text": "PHILIPPINES - PHL"}, {"optionIndex": 164, "text": "PITCAIRN - PCN"}, {"optionIndex": 165, "text": "POLAND - POL"}, {"optionIndex": 166, "text": "PORTUGAL - PRT"}, {"optionIndex": 167, "text": "PUERTO RICO - PRI"}, {"optionIndex": 168, "text": "QATAR - QAT"}, {"optionIndex": 169, "text": "REUNION - REU"}, {"optionIndex": 170, "text": "ROMANIA - ROU"}, {"optionIndex": 171, "text": "ROMANIA PRE 1/2/2002 - ROM"}, {"optionIndex": 172, "text": "RUSSIAN FEDERATION - RUS"}, {"optionIndex": 173, "text": "RWANDA - RWA"}, {"optionIndex": 174, "text": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA - SHN"}, {"optionIndex": 175, "text": "SAINT KITTS AND NEVIS - KNA"}, {"optionIndex": 176, "text": "SAINT LUCIA - LCA"}, {"optionIndex": 177, "text": "SAINT VINCENT AND THE GRENADINES - VCT"}, {"optionIndex": 178, "text": "SAMOA - WSM"}, {"optionIndex": 179, "text": "SAN MARINO - SMR"}, {"optionIndex": 180, "text": "SAO TOME AND PRINCIPE - STP"}, {"optionIndex": 181, "text": "SAUDI ARABIA - SAU"}, {"optionIndex": 182, "text": "SENEGAL - SEN"}, {"optionIndex": 183, "text": "SERBIA - SRB"}, {"optionIndex": 184, "text": "SERBIA AND MONTENEGRO - SCG"}, {"optionIndex": 185, "text": "SEYCHELLES - SYC"}, {"optionIndex": 186, "text": "SIERRA LEONE - SLE"}, {"optionIndex": 187, "text": "SINGAPORE - SGP"}, {"optionIndex": 188, "text": "SINT MAARTEN (DUTCH PART) - SXM"}, {"optionIndex": 189, "text": "SLOVAK REPUBLIC - SVK"}, {"optionIndex": 190, "text": "SLOVENIA - SVN"}, {"optionIndex": 191, "text": "SOLOMON ISLANDS - SLB"}, {"optionIndex": 192, "text": "SOMALIA - SOM"}, {"optionIndex": 193, "text": "SOUTH AFRICA - ZAF"}, {"optionIndex": 194, "text": "SOUTH SUDAN - SSD"}, {"optionIndex": 195, "text": "SPAIN - ESP"}, {"optionIndex": 196, "text": "SRI LANKA - LKA"}, {"optionIndex": 197, "text": "SUDAN - SDN"}, {"optionIndex": 198, "text": "SURINAME - SUR"}, {"optionIndex": 199, "text": "SWEDEN - SWE"}, {"optionIndex": 200, "text": "SWITZERLAND - CHE"}, {"optionIndex": 201, "text": "SYRIAN ARAB REPUBLIC - SYR"}, {"optionIndex": 202, "text": "TAIWAN - TWN"}, {"optionIndex": 203, "text": "TAJIKISTAN - TJK"}, {"optionIndex": 204, "text": "TANZANIA, UNITED REPUBLIC OF - TZA"}, {"optionIndex": 205, "text": "THAILAND - THA"}, {"optionIndex": 206, "text": "TIMOR-LESTE - TLS"}, {"optionIndex": 207, "text": "TOGO - TGO"}, {"optionIndex": 208, "text": "TOKELAU - TKL"}, {"optionIndex": 209, "text": "TONGA - TON"}, {"optionIndex": 210, "text": "TRINIDAD AND TOBAGO - TTO"}, {"optionIndex": 211, "text": "TUNISIA - TUN"}, {"optionIndex": 212, "text": "TURKIYE - TUR"}, {"optionIndex": 213, "text": "TURKMENISTAN - TKM"}, {"optionIndex": 214, "text": "TURKS AND CAICOS ISLANDS - TCA"}, {"optionIndex": 215, "text": "TUVALU - TUV"}, {"optionIndex": 216, "text": "UGANDA - UGA"}, {"optionIndex": 217, "text": "UKRAINE - UKR"}, {"optionIndex": 218, "text": "UNITED ARAB EMIRATES - ARE"}, {"optionIndex": 219, "text": "UNITED KINGDOM - BRITISH CITIZEN - GBR"}, {"optionIndex": 220, "text": "UNITED KINGDOM - BRITISH NATIONAL (OVERSEAS) - GBN"}, {"optionIndex": 221, "text": "UNITED KINGDOM - BRITISH OVERSEAS CITIZEN - GBO"}, {"optionIndex": 222, "text": "UNITED KINGDOM - BRITISH OVERSEAS TERRITORIES CITIZEN - GBD"}, {"optionIndex": 223, "text": "UNITED KINGDOM - BRITISH SUBJECT - GBS"}, {"optionIndex": 224, "text": "UNITED STATES - USA"}, {"optionIndex": 225, "text": "URUGUAY - URY"}, {"optionIndex": 226, "text": "UZBEKISTAN - UZB"}, {"optionIndex": 227, "text": "VANUATU - VUT"}, {"optionIndex": 228, "text": "VATICAN CITY STATE (HOLY SEE) - VAT"}, {"optionIndex": 229, "text": "VENEZUELA - VEN"}, {"optionIndex": 230, "text": "VIET NAM - VNM"}, {"optionIndex": 231, "text": "VIRGIN ISLANDS (BRITISH) - VGB"}, {"optionIndex": 232, "text": "YEMEN, REPUBLIC OF - YEM"}, {"optionIndex": 233, "text": "YUGOSLAVIA - YUG"}, {"optionIndex": 234, "text": "ZAIRE - ZAR"}, {"optionIndex": 235, "text": "ZAMBIA - ZMB"}, {"optionIndex": 236, "text": "ZIMBABWE - ZWE"}]}, "text": "AFGHANISTAN - AFGALBANIA - ALBALGERIA - DZAAMERICAN SAMOA - ASMANDORRA - ANDANGOLA - AGOANGUILLA - AIAANTIGUA AND BARBUDA - ATGARGENTINA - ARGARMENIA - ARMARUBA - ABWAUSTRALIA - AUSAUSTRIA - AUTAZERBAIJAN - AZEBAHAMAS - BHSBAHRAIN - BHRBANGLADESH - BGDBARBADOS - BRBBELARUS - BLRBELGIUM - BELBELIZE - BLZBENIN - BENBERMUDA - BMUBHUTAN - BTNBOLIVIA - BOLBONAIRE, SINT EUSTATIUS AND SABA - BESBOSNIA AND HERZEGOVINA - BIHBOTSWANA - BWABRAZIL - BRABRUNEI DARUSSALAM - BRNBULGARIA - BGRBURKINA FASO - BFAMYANMAR - MMRBURUNDI - BDICABO VERDE - CPVCAMBODIA - KHMCAMEROON - CMRCANADA - CANCAYMAN ISLANDS - CYMCENTRAL AFRICAN REPUBLIC - CAFCHAD - TCDCHILE - CHLCHINA - CHNCOLOMBIA - COLCOMOROS - COMCONGO - COGCONGO, DEMOCRATIC REPUBLIC OF THE - CODCOOK ISLANDS - COKCOSTA RICA - CRICOTE D'IVOIRE - CIVCROATIA - HRVCUBA - CUBCURACAO - CUWCYPRUS - CYPCZECHIA (CZECH REP) - CZEDENMARK - DNKDJIBOUTI - DJIDOMINICA - DMADOMINICAN REPUBLIC - DOMEAST TIMOR - TMPECUADOR - ECUEGYPT - EGYEL SALVADOR - SLVEQUATORIAL GUINEA - GNQERITREA - ERIESTONIA - ESTESWATINI - SWZETHIOPIA - ETHFALKLAND ISLANDS (MALVINAS) - FLKFIJI - FJIFINLAND - FINFRANCE - FRAFRENCH GUIANA - GUFFRENCH POLYNESIA - PYFGABON - GABGAMBIA - GMBGEORGIA - GEOGERMANY - DGHANA - GHAGIBRALTAR - GIBGREECE - GRCGREENLAND - GRLGRENADA - GRDGUADELOUPE - GLPGUAM - GUMGUATEMALA - GTMGUINEA - GINGUINEA-BISSAU - GNBGUYANA - GUYHAITI - HTIHONDURAS - HNDHONG KONG SAR - HKGHUNGARY - HUNICELAND - ISLINDIA - INDINDONESIA - IDNIRAN, ISLAMIC REPUBLIC OF - IRNIRAQ - IRQIRELAND - IRLISRAEL - ISRITALY - ITAJAMAICA - JAMJAPAN - JPNJORDAN - JORKAZAKHSTAN - KAZKENYA - KENKIRIBATI - KIRKOREA, DEMOCRATIC PEOPLES REPUBLIC OF (NORTH) - PRKKOREA, REPUBLIC OF (SOUTH) - KORKOSOVO - RKSKUWAIT - KWTKYRGYZSTAN - KGZLAO PEOPLE'S DEMOCRATIC REPUBLIC - LAOLATVIA - LVALEBANON - LBNLESOTHO - LSOLIBERIA - LBRLIBYA - LBYLIECHTENSTEIN - LIELITHUANIA - LTULUXEMBOURG - LUXMACAU SAR - MACMADAGASCAR - MDGMALAWI - MWIMALAYSIA - MYSMALDIVES - MDVMALI - MLIMALTA - MLTMARSHALL ISLANDS - MHLMARTINIQUE - MTQMAURITANIA - MRTMAURITIUS - MUSMEXICO - MEXMICRONESIA, FEDERATED STATES OF - FSMMOLDOVA, REPUBLIC OF - MDAMONACO - MCOMONGOLIA - MNGMONTENEGRO - MNEMONTSERRAT - MSRMOROCCO - MARMOZAMBIQUE - MOZNAMIBIA - NAMNAURU - NRUNEPAL - NPLNETHERLANDS - NLDNETHERLANDS ANTILLES - ANTNEW CALEDONIA - NCLNEW ZEALAND - NZLNICARAGUA - NICNIGER - NERNIGERIA - NGANIUE - NIUNORTH MACEDONIA - MKDNORWAY - NOROMAN - OMNPAKISTAN - PAKPALAU - PLWPALESTINIAN AUTHORITY - PSEPANAMA - PANPAPUA NEW GUINEA - PNGPARAGUAY - PRYPERU - PERPHILIPPINES - PHLPITCAIRN - PCNPOLAND - POLPORTUGAL - PRTPUERTO RICO - PRIQATAR - QATREUNION - REUROMANIA - ROUROMANIA PRE 1/2/2002 - ROMRUSSIAN FEDERATION - RUSRWANDA - RWASAINT HELENA, ASCENSION AND TRISTAN DA CUNHA - SHNSAINT KITTS AND NEVIS - KNASAINT LUCIA - LCASAINT VINCENT AND THE GRENADINES - VCTSAMOA - WSMSAN MARINO - SMRSAO TOME AND PRINCIPE - STPSAUDI ARABIA - SAUSENEGAL - SENSERBIA - SRBSERBIA AND MONTENEGRO - SCGSEYCHELLES - SYCSIERRA LEONE - SLESINGAPORE - SGPSINT MAARTEN (DUTCH PART) - SXMSLOVAK REPUBLIC - SVKSLOVENIA - SVNSOLOMON ISLANDS - SLBSOMALIA - SOMSOUTH AFRICA - ZAFSOUTH SUDAN - SSDSPAIN - ESPSRI LANKA - LKASUDAN - SDNSURINAME - SURSWEDEN - SWESWITZERLAND - CHESYRIAN ARAB REPUBLIC - SYRTAIWAN - TWNTAJIKISTAN - TJKTANZANIA, UNITED REPUBLIC OF - TZATHAILAND - THATIMOR-LESTE - TLSTOGO - TGOTOKELAU - TKLTONGA - TONTRINIDAD AND TOBAGO - TTOTUNISIA - TUNTURKIYE - TURTURKMENISTAN - TKMTURKS AND CAICOS ISLANDS - TCATUVALU - TUVUGANDA - UGAUKRAINE - UKRUNITED ARAB EMIRATES - AREUNITED KINGDOM - BRITISH CITIZEN - GBRUNITED KINGDOM - BRITISH NATIONAL (OVERSEAS) - GBNUNITED KINGDOM - BRITISH OVERSEAS CITIZEN - GBOUNITED KINGDOM - BRITISH OVERSEAS TERRITORIES CITIZEN - GBDUNITED KINGDOM - BRITISH SUBJECT - GBSUNITED STATES - USAURUGUAY - URYUZBEKISTAN - UZBVANUATU - VUTVATICAN CITY STATE (HOLY SEE) - VATVENEZUELA - VENVIET NAM - VNMVIRGIN ISLANDS (BRITISH) - VGBYEMEN, REPUBLIC OF - YEMYUGOSLAVIA - YUGZAIRE - ZARZAMBIA - ZMBZIMBABWE - ZWE", "children": [{"id": 22, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "", "data-wc-null": "1", "selected": "selected", "unique_id": "22"}, "text": "", "children": []}, {"id": 23, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AFG", "unique_id": "23"}, "text": "AFGHANISTAN - AFG", "children": []}, {"id": 24, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ALB", "unique_id": "24"}, "text": "ALBANIA - ALB", "children": []}, {"id": 25, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DZA", "unique_id": "25"}, "text": "ALGERIA - DZA", "children": []}, {"id": 26, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ASM", "unique_id": "26"}, "text": "AMERICAN SAMOA - ASM", "children": []}, {"id": 27, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AND", "unique_id": "27"}, "text": "ANDORRA - AND", "children": []}, {"id": 28, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AGO", "unique_id": "28"}, "text": "ANGOLA - AGO", "children": []}, {"id": 29, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AIA", "unique_id": "29"}, "text": "ANGUILLA - AIA", "children": []}, {"id": 30, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ATG", "unique_id": "30"}, "text": "ANTIGUA AND BARBUDA - ATG", "children": []}, {"id": 31, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARG", "unique_id": "31"}, "text": "ARGENTINA - ARG", "children": []}, {"id": 32, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARM", "unique_id": "32"}, "text": "ARMENIA - ARM", "children": []}, {"id": 33, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ABW", "unique_id": "33"}, "text": "ARUBA - ABW", "children": []}, {"id": 34, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AUS", "unique_id": "34"}, "text": "AUSTRALIA - AUS", "children": []}, {"id": 35, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AUT", "unique_id": "35"}, "text": "AUSTRIA - AUT", "children": []}, {"id": 36, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AZE", "unique_id": "36"}, "text": "AZERBAIJAN - AZE", "children": []}, {"id": 37, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BHS", "unique_id": "37"}, "text": "BAHAMAS - BHS", "children": []}, {"id": 38, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BHR", "unique_id": "38"}, "text": "BAHRAIN - BHR", "children": []}, {"id": 39, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BGD", "unique_id": "39"}, "text": "BANGLADESH - BGD", "children": []}, {"id": 40, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRB", "unique_id": "40"}, "text": "BARBADOS - BRB", "children": []}, {"id": 41, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BLR", "unique_id": "41"}, "text": "BELARUS - BLR", "children": []}, {"id": 42, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BEL", "unique_id": "42"}, "text": "BELGIUM - BEL", "children": []}, {"id": 43, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BLZ", "unique_id": "43"}, "text": "BELIZE - BLZ", "children": []}, {"id": 44, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BEN", "unique_id": "44"}, "text": "BENIN - BEN", "children": []}, {"id": 45, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BMU", "unique_id": "45"}, "text": "BERMUDA - BMU", "children": []}, {"id": 46, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BTN", "unique_id": "46"}, "text": "BHUTAN - BTN", "children": []}, {"id": 47, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BOL", "unique_id": "47"}, "text": "BOLIVIA - BOL", "children": []}, {"id": 48, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BES", "unique_id": "48"}, "text": "BONAIRE, SINT EUSTATIUS AND SABA - BES", "children": []}, {"id": 49, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BIH", "unique_id": "49"}, "text": "BOSNIA AND HERZEGOVINA - BIH", "children": []}, {"id": 50, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BWA", "unique_id": "50"}, "text": "BOTSWANA - BWA", "children": []}, {"id": 51, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRA", "unique_id": "51"}, "text": "BRAZIL - BRA", "children": []}, {"id": 52, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRN", "unique_id": "52"}, "text": "BRUNEI DARUSSALAM - BRN", "children": []}, {"id": 53, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BGR", "unique_id": "53"}, "text": "BULGARIA - BGR", "children": []}, {"id": 54, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BFA", "unique_id": "54"}, "text": "BURKINA FASO - BFA", "children": []}, {"id": 55, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MMR", "unique_id": "55"}, "text": "MYANMAR - MMR", "children": []}, {"id": 56, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BDI", "unique_id": "56"}, "text": "BURUNDI - BDI", "children": []}, {"id": 57, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CPV", "unique_id": "57"}, "text": "CABO VERDE - CPV", "children": []}, {"id": 58, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KHM", "unique_id": "58"}, "text": "CAMBODIA - KHM", "children": []}, {"id": 59, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CMR", "unique_id": "59"}, "text": "CAMEROON - CMR", "children": []}, {"id": 60, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CAN", "unique_id": "60"}, "text": "CANADA - CAN", "children": []}, {"id": 61, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CYM", "unique_id": "61"}, "text": "CAYMAN ISLANDS - CYM", "children": []}, {"id": 62, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CAF", "unique_id": "62"}, "text": "CENTRAL AFRICAN REPUBLIC - CAF", "children": []}, {"id": 63, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TCD", "unique_id": "63"}, "text": "CHAD - TCD", "children": []}, {"id": 64, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHL", "unique_id": "64"}, "text": "CHILE - CHL", "children": []}, {"id": 65, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHN", "unique_id": "65"}, "text": "CHINA - CHN", "children": []}, {"id": 66, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COL", "unique_id": "66"}, "text": "COLOMBIA - COL", "children": []}, {"id": 67, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COM", "unique_id": "67"}, "text": "COMOROS - COM", "children": []}, {"id": 68, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COG", "unique_id": "68"}, "text": "CONGO - COG", "children": []}, {"id": 69, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COD", "unique_id": "69"}, "text": "CONGO, DEMOCRATIC REPUBLIC OF THE - COD", "children": []}, {"id": 70, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COK", "unique_id": "70"}, "text": "COOK ISLANDS - COK", "children": []}, {"id": 71, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CRI", "unique_id": "71"}, "text": "COSTA RICA - CRI", "children": []}, {"id": 72, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CIV", "unique_id": "72"}, "text": "COTE D'IVOIRE - CIV", "children": []}, {"id": 73, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HRV", "unique_id": "73"}, "text": "CROATIA - HRV", "children": []}, {"id": 74, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CUB", "unique_id": "74"}, "text": "CUBA - CUB", "children": []}, {"id": 75, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CUW", "unique_id": "75"}, "text": "CURACAO - CUW", "children": []}, {"id": 76, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CYP", "unique_id": "76"}, "text": "CYPRUS - CYP", "children": []}, {"id": 77, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CZE", "unique_id": "77"}, "text": "CZECHIA (CZECH REP) - CZE", "children": []}, {"id": 78, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DNK", "unique_id": "78"}, "text": "DENMARK - DNK", "children": []}, {"id": 79, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DJI", "unique_id": "79"}, "text": "DJIBOUTI - DJI", "children": []}, {"id": 80, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DMA", "unique_id": "80"}, "text": "DOMINICA - DMA", "children": []}, {"id": 81, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DOM", "unique_id": "81"}, "text": "DOMINICAN REPUBLIC - DOM", "children": []}, {"id": 82, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TMP", "unique_id": "82"}, "text": "EAST TIMOR - TMP", "children": []}, {"id": 83, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ECU", "unique_id": "83"}, "text": "ECUADOR - ECU", "children": []}, {"id": 84, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "EGY", "unique_id": "84"}, "text": "EGYPT - EGY", "children": []}, {"id": 85, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLV", "unique_id": "85"}, "text": "EL SALVADOR - SLV", "children": []}, {"id": 86, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GNQ", "unique_id": "86"}, "text": "EQUATORIAL GUINEA - GNQ", "children": []}, {"id": 87, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ERI", "unique_id": "87"}, "text": "ERITREA - ERI", "children": []}, {"id": 88, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "EST", "unique_id": "88"}, "text": "ESTONIA - EST", "children": []}, {"id": 89, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWZ", "unique_id": "89"}, "text": "ESWATINI - SWZ", "children": []}, {"id": 90, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ETH", "unique_id": "90"}, "text": "ETHIOPIA - ETH", "children": []}, {"id": 91, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FLK", "unique_id": "91"}, "text": "FALKLAND ISLANDS (MALVINAS) - FLK", "children": []}, {"id": 92, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FJI", "unique_id": "92"}, "text": "FIJI - FJI", "children": []}, {"id": 93, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FIN", "unique_id": "93"}, "text": "FINLAND - FIN", "children": []}, {"id": 94, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FRA", "unique_id": "94"}, "text": "FRANCE - FRA", "children": []}, {"id": 95, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUF", "unique_id": "95"}, "text": "FRENCH GUIANA - GUF", "children": []}, {"id": 96, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PYF", "unique_id": "96"}, "text": "FRENCH POLYNESIA - PYF", "children": []}, {"id": 97, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GAB", "unique_id": "97"}, "text": "GABON - GAB", "children": []}, {"id": 98, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GMB", "unique_id": "98"}, "text": "GAMBIA - GMB", "children": []}, {"id": 99, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GEO", "unique_id": "99"}, "text": "GEORGIA - GEO", "children": []}, {"id": 100, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "D", "unique_id": "100"}, "text": "GERMANY - D", "children": []}, {"id": 101, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GHA", "unique_id": "101"}, "text": "GHANA - GHA", "children": []}, {"id": 102, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GIB", "unique_id": "102"}, "text": "GIBRALTAR - GIB", "children": []}, {"id": 103, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRC", "unique_id": "103"}, "text": "GREECE - GRC", "children": []}, {"id": 104, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRL", "unique_id": "104"}, "text": "GREENLAND - GRL", "children": []}, {"id": 105, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRD", "unique_id": "105"}, "text": "GRENADA - GRD", "children": []}, {"id": 106, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GLP", "unique_id": "106"}, "text": "GUADELOUPE - GLP", "children": []}, {"id": 107, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUM", "unique_id": "107"}, "text": "GUAM - GUM", "children": []}, {"id": 108, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GTM", "unique_id": "108"}, "text": "GUATEMALA - GTM", "children": []}, {"id": 109, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GIN", "unique_id": "109"}, "text": "GUINEA - GIN", "children": []}, {"id": 110, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GNB", "unique_id": "110"}, "text": "GUINEA-BISSAU - GNB", "children": []}, {"id": 111, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUY", "unique_id": "111"}, "text": "GUYANA - GUY", "children": []}, {"id": 112, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HTI", "unique_id": "112"}, "text": "HAITI - HTI", "children": []}, {"id": 113, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HND", "unique_id": "113"}, "text": "HONDURAS - HND", "children": []}, {"id": 114, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HKG", "unique_id": "114"}, "text": "HONG KONG SAR - HKG", "children": []}, {"id": 115, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HUN", "unique_id": "115"}, "text": "HUNGARY - HUN", "children": []}, {"id": 116, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ISL", "unique_id": "116"}, "text": "ICELAND - ISL", "children": []}, {"id": 117, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IND", "unique_id": "117"}, "text": "INDIA - IND", "children": []}, {"id": 118, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IDN", "unique_id": "118"}, "text": "INDONESIA - IDN", "children": []}, {"id": 119, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRN", "unique_id": "119"}, "text": "IRAN, ISLAMIC REPUBLIC OF - IRN", "children": []}, {"id": 120, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRQ", "unique_id": "120"}, "text": "IRAQ - IRQ", "children": []}, {"id": 121, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRL", "unique_id": "121"}, "text": "IRELAND - IRL", "children": []}, {"id": 122, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ISR", "unique_id": "122"}, "text": "ISRAEL - ISR", "children": []}, {"id": 123, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ITA", "unique_id": "123"}, "text": "ITALY - ITA", "children": []}, {"id": 124, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JAM", "unique_id": "124"}, "text": "JAMAICA - JAM", "children": []}, {"id": 125, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JPN", "unique_id": "125"}, "text": "JAPAN - JPN", "children": []}, {"id": 126, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JOR", "unique_id": "126"}, "text": "JORDAN - JOR", "children": []}, {"id": 127, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KAZ", "unique_id": "127"}, "text": "KAZAKHSTAN - KAZ", "children": []}, {"id": 128, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KEN", "unique_id": "128"}, "text": "KENYA - KEN", "children": []}, {"id": 129, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KIR", "unique_id": "129"}, "text": "KIRIBATI - KIR", "children": []}, {"id": 130, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRK", "unique_id": "130"}, "text": "KOREA, DEMOCRATIC PEOPLES REPUBLIC OF (NORTH) - PRK", "children": []}, {"id": 131, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KOR", "unique_id": "131"}, "text": "KOREA, REPUBLIC OF (SOUTH) - KOR", "children": []}, {"id": 132, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RKS", "unique_id": "132"}, "text": "KOSOVO - RKS", "children": []}, {"id": 133, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KWT", "unique_id": "133"}, "text": "KUWAIT - KWT", "children": []}, {"id": 134, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KGZ", "unique_id": "134"}, "text": "KYRGYZSTAN - KGZ", "children": []}, {"id": 135, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LAO", "unique_id": "135"}, "text": "LAO PEOPLE'S DEMOCRATIC REPUBLIC - LAO", "children": []}, {"id": 136, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LVA", "unique_id": "136"}, "text": "LATVIA - LVA", "children": []}, {"id": 137, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LBN", "unique_id": "137"}, "text": "LEBANON - LBN", "children": []}, {"id": 138, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LSO", "unique_id": "138"}, "text": "LESOTHO - LSO", "children": []}, {"id": 139, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LBR", "unique_id": "139"}, "text": "LIBERIA - LBR", "children": []}, {"id": 140, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LBY", "unique_id": "140"}, "text": "LIBYA - LBY", "children": []}, {"id": 141, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LIE", "unique_id": "141"}, "text": "LIECHTENSTEIN - LIE", "children": []}, {"id": 142, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LTU", "unique_id": "142"}, "text": "LITHUANIA - LTU", "children": []}, {"id": 143, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LUX", "unique_id": "143"}, "text": "LUXEMBOURG - LUX", "children": []}, {"id": 144, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAC", "unique_id": "144"}, "text": "MACAU SAR - MAC", "children": []}, {"id": 145, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MDG", "unique_id": "145"}, "text": "MADAGASCAR - MDG", "children": []}, {"id": 146, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MWI", "unique_id": "146"}, "text": "MALAWI - MWI", "children": []}, {"id": 147, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MYS", "unique_id": "147"}, "text": "MALAYSIA - MYS", "children": []}, {"id": 148, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MDV", "unique_id": "148"}, "text": "MALDIVES - MDV", "children": []}, {"id": 149, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MLI", "unique_id": "149"}, "text": "MALI - MLI", "children": []}, {"id": 150, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MLT", "unique_id": "150"}, "text": "MALTA - MLT", "children": []}, {"id": 151, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MHL", "unique_id": "151"}, "text": "MARSHALL ISLANDS - MHL", "children": []}, {"id": 152, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MTQ", "unique_id": "152"}, "text": "MARTINIQUE - MTQ", "children": []}, {"id": 153, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MRT", "unique_id": "153"}, "text": "MAURITANIA - MRT", "children": []}, {"id": 154, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MUS", "unique_id": "154"}, "text": "MAURITIUS - MUS", "children": []}, {"id": 155, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MEX", "unique_id": "155"}, "text": "MEXICO - MEX", "children": []}, {"id": 156, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FSM", "unique_id": "156"}, "text": "MICRONESIA, FEDERATED STATES OF - FSM", "children": []}, {"id": 157, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MDA", "unique_id": "157"}, "text": "MOLDOVA, REPUBLIC OF - MDA", "children": []}, {"id": 158, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MCO", "unique_id": "158"}, "text": "MONACO - MCO", "children": []}, {"id": 159, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MNG", "unique_id": "159"}, "text": "MONGOLIA - MNG", "children": []}, {"id": 160, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MNE", "unique_id": "160"}, "text": "MONTENEGRO - MNE", "children": []}, {"id": 161, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MSR", "unique_id": "161"}, "text": "MONTSERRAT - MSR", "children": []}, {"id": 162, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAR", "unique_id": "162"}, "text": "MOROCCO - MAR", "children": []}, {"id": 163, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MOZ", "unique_id": "163"}, "text": "MOZAMBIQUE - MOZ", "children": []}, {"id": 164, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NAM", "unique_id": "164"}, "text": "NAMIBIA - NAM", "children": []}, {"id": 165, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NRU", "unique_id": "165"}, "text": "NAURU - NRU", "children": []}, {"id": 166, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NPL", "unique_id": "166"}, "text": "NEPAL - NPL", "children": []}, {"id": 167, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NLD", "unique_id": "167"}, "text": "NETHERLANDS - NLD", "children": []}, {"id": 168, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ANT", "unique_id": "168"}, "text": "NETHERLANDS ANTILLES - ANT", "children": []}, {"id": 169, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NCL", "unique_id": "169"}, "text": "NEW CALEDONIA - NCL", "children": []}, {"id": 170, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NZL", "unique_id": "170"}, "text": "NEW ZEALAND - NZL", "children": []}, {"id": 171, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NIC", "unique_id": "171"}, "text": "NICARAGUA - NIC", "children": []}, {"id": 172, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NER", "unique_id": "172"}, "text": "NIGER - NER", "children": []}, {"id": 173, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NGA", "unique_id": "173"}, "text": "NIGERIA - NGA", "children": []}, {"id": 174, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NIU", "unique_id": "174"}, "text": "NIUE - NIU", "children": []}, {"id": 175, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MKD", "unique_id": "175"}, "text": "NORTH MACEDONIA - MKD", "children": []}, {"id": 176, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NOR", "unique_id": "176"}, "text": "NORWAY - NOR", "children": []}, {"id": 177, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "OMN", "unique_id": "177"}, "text": "OMAN - OMN", "children": []}, {"id": 178, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PAK", "unique_id": "178"}, "text": "PAKISTAN - PAK", "children": []}, {"id": 179, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PLW", "unique_id": "179"}, "text": "PALAU - PLW", "children": []}, {"id": 180, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PSE", "unique_id": "180"}, "text": "PALESTINIAN AUTHORITY - PSE", "children": []}, {"id": 181, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PAN", "unique_id": "181"}, "text": "PANAMA - PAN", "children": []}, {"id": 182, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PNG", "unique_id": "182"}, "text": "PAPUA NEW GUINEA - PNG", "children": []}, {"id": 183, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRY", "unique_id": "183"}, "text": "PARAGUAY - PRY", "children": []}, {"id": 184, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PER", "unique_id": "184"}, "text": "PERU - PER", "children": []}, {"id": 185, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PHL", "unique_id": "185"}, "text": "PHILIPPINES - PHL", "children": []}, {"id": 186, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PCN", "unique_id": "186"}, "text": "PITCAIRN - PCN", "children": []}, {"id": 187, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "POL", "unique_id": "187"}, "text": "POLAND - POL", "children": []}, {"id": 188, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRT", "unique_id": "188"}, "text": "PORTUGAL - PRT", "children": []}, {"id": 189, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRI", "unique_id": "189"}, "text": "PUERTO RICO - PRI", "children": []}, {"id": 190, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "QAT", "unique_id": "190"}, "text": "QATAR - QAT", "children": []}, {"id": 191, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "REU", "unique_id": "191"}, "text": "REUNION - REU", "children": []}, {"id": 192, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ROU", "unique_id": "192"}, "text": "ROMANIA - ROU", "children": []}, {"id": 193, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ROM", "unique_id": "193"}, "text": "ROMANIA PRE 1/2/2002 - ROM", "children": []}, {"id": 194, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RUS", "unique_id": "194"}, "text": "RUSSIAN FEDERATION - RUS", "children": []}, {"id": 195, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RWA", "unique_id": "195"}, "text": "RWANDA - RWA", "children": []}, {"id": 196, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SHN", "unique_id": "196"}, "text": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA - SHN", "children": []}, {"id": 197, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KNA", "unique_id": "197"}, "text": "SAINT KITTS AND NEVIS - KNA", "children": []}, {"id": 198, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LCA", "unique_id": "198"}, "text": "SAINT LUCIA - LCA", "children": []}, {"id": 199, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VCT", "unique_id": "199"}, "text": "SAINT VINCENT AND THE GRENADINES - VCT", "children": []}, {"id": 200, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "WSM", "unique_id": "200"}, "text": "SAMOA - WSM", "children": []}, {"id": 201, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SMR", "unique_id": "201"}, "text": "SAN MARINO - SMR", "children": []}, {"id": 202, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STP", "unique_id": "202"}, "text": "SAO TOME AND PRINCIPE - STP", "children": []}, {"id": 203, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SAU", "unique_id": "203"}, "text": "SAUDI ARABIA - SAU", "children": []}, {"id": 204, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SEN", "unique_id": "204"}, "text": "SENEGAL - SEN", "children": []}, {"id": 205, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SRB", "unique_id": "205"}, "text": "SERBIA - SRB", "children": []}, {"id": 206, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SCG", "unique_id": "206"}, "text": "SERBIA AND MONTENEGRO - SCG", "children": []}, {"id": 207, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SYC", "unique_id": "207"}, "text": "SEYCHELLES - SYC", "children": []}, {"id": 208, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLE", "unique_id": "208"}, "text": "SIERRA LEONE - SLE", "children": []}, {"id": 209, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SGP", "unique_id": "209"}, "text": "SINGAPORE - SGP", "children": []}, {"id": 210, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SXM", "unique_id": "210"}, "text": "SINT MAARTEN (DUTCH PART) - SXM", "children": []}, {"id": 211, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SVK", "unique_id": "211"}, "text": "SLOVAK REPUBLIC - SVK", "children": []}, {"id": 212, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SVN", "unique_id": "212"}, "text": "SLOVENIA - SVN", "children": []}, {"id": 213, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLB", "unique_id": "213"}, "text": "SOLOMON ISLANDS - SLB", "children": []}, {"id": 214, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SOM", "unique_id": "214"}, "text": "SOMALIA - SOM", "children": []}, {"id": 215, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZAF", "unique_id": "215"}, "text": "SOUTH AFRICA - ZAF", "children": []}, {"id": 216, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SSD", "unique_id": "216"}, "text": "SOUTH SUDAN - SSD", "children": []}, {"id": 217, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ESP", "unique_id": "217"}, "text": "SPAIN - ESP", "children": []}, {"id": 218, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LKA", "unique_id": "218"}, "text": "SRI LANKA - LKA", "children": []}, {"id": 219, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SDN", "unique_id": "219"}, "text": "SUDAN - SDN", "children": []}, {"id": 220, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SUR", "unique_id": "220"}, "text": "SURINAME - SUR", "children": []}, {"id": 221, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWE", "unique_id": "221"}, "text": "SWEDEN - SWE", "children": []}, {"id": 222, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHE", "unique_id": "222"}, "text": "SWITZERLAND - CHE", "children": []}, {"id": 223, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SYR", "unique_id": "223"}, "text": "SYRIAN ARAB REPUBLIC - SYR", "children": []}, {"id": 224, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TWN", "unique_id": "224"}, "text": "TAIWAN - TWN", "children": []}, {"id": 225, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TJK", "unique_id": "225"}, "text": "TAJIKISTAN - TJK", "children": []}, {"id": 226, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TZA", "unique_id": "226"}, "text": "TANZANIA, UNITED REPUBLIC OF - TZA", "children": []}, {"id": 227, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "THA", "unique_id": "227"}, "text": "THAILAND - THA", "children": []}, {"id": 228, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TLS", "unique_id": "228"}, "text": "TIMOR-LESTE - TLS", "children": []}, {"id": 229, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TGO", "unique_id": "229"}, "text": "TOGO - TGO", "children": []}, {"id": 230, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TKL", "unique_id": "230"}, "text": "TOKELAU - TKL", "children": []}, {"id": 231, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TON", "unique_id": "231"}, "text": "TONGA - TON", "children": []}, {"id": 232, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TTO", "unique_id": "232"}, "text": "TRINIDAD AND TOBAGO - TTO", "children": []}, {"id": 233, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUN", "unique_id": "233"}, "text": "TUNISIA - TUN", "children": []}, {"id": 234, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUR", "unique_id": "234"}, "text": "TURKIYE - TUR", "children": []}, {"id": 235, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TKM", "unique_id": "235"}, "text": "TURKMENISTAN - TKM", "children": []}, {"id": 236, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TCA", "unique_id": "236"}, "text": "TURKS AND CAICOS ISLANDS - TCA", "children": []}, {"id": 237, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUV", "unique_id": "237"}, "text": "TUVALU - TUV", "children": []}, {"id": 238, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UGA", "unique_id": "238"}, "text": "UGANDA - UGA", "children": []}, {"id": 239, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UKR", "unique_id": "239"}, "text": "UKRAINE - UKR", "children": []}, {"id": 240, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARE", "unique_id": "240"}, "text": "UNITED ARAB EMIRATES - ARE", "children": []}, {"id": 241, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBR", "unique_id": "241"}, "text": "UNITED KINGDOM - BRITISH CITIZEN - GBR", "children": []}, {"id": 242, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBN", "unique_id": "242"}, "text": "UNITED KINGDOM - BRITISH NATIONAL (OVERSEAS) - GBN", "children": []}, {"id": 243, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBO", "unique_id": "243"}, "text": "UNITED KINGDOM - BRITISH OVERSEAS CITIZEN - GBO", "children": []}, {"id": 244, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBD", "unique_id": "244"}, "text": "UNITED KINGDOM - BRITISH OVERSEAS TERRITORIES CITIZEN - GBD", "children": []}, {"id": 245, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBS", "unique_id": "245"}, "text": "UNITED KINGDOM - BRITISH SUBJECT - GBS", "children": []}, {"id": 246, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "USA", "unique_id": "246"}, "text": "UNITED STATES - USA", "children": []}, {"id": 247, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "URY", "unique_id": "247"}, "text": "URUGUAY - URY", "children": []}, {"id": 248, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UZB", "unique_id": "248"}, "text": "UZBEKISTAN - UZB", "children": []}, {"id": 249, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VUT", "unique_id": "249"}, "text": "VANUATU - VUT", "children": []}, {"id": 250, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VAT", "unique_id": "250"}, "text": "VATICAN CITY STATE (HOLY SEE) - VAT", "children": []}, {"id": 251, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VEN", "unique_id": "251"}, "text": "VENEZUELA - VEN", "children": []}, {"id": 252, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VNM", "unique_id": "252"}, "text": "VIET NAM - VNM", "children": []}, {"id": 253, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VGB", "unique_id": "253"}, "text": "VIRGIN ISLANDS (BRITISH) - VGB", "children": []}, {"id": 254, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "YEM", "unique_id": "254"}, "text": "YEMEN, REPUBLIC OF - YEM", "children": []}, {"id": 255, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "YUG", "unique_id": "255"}, "text": "YUGOSLAVIA - YUG", "children": []}, {"id": 256, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZAR", "unique_id": "256"}, "text": "ZAIRE - ZAR", "children": []}, {"id": 257, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZMB", "unique_id": "257"}, "text": "ZAMBIA - ZMB", "children": []}, {"id": 258, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZWE", "unique_id": "258"}, "text": "ZIMBABWE - ZWE", "children": []}]}, {"id": 259, "marker": "KS", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a7d0b0_input", "id": "_2a0j0a0a0e0a0a2a7d0a0", "class": "wc-label", "unique_id": "259"}, "text": "Nationality of passport holder", "children": []}, {"id": 260, "marker": "M", "tagName": "select", "attributes": {"id": "_2a0j0a0a0e0a0a2a7d0b0_input", "name": "_2a0j0a0a0e0a0a2a7d0b0", "unique_id": "260", "options": [{"optionIndex": 0, "text": ""}, {"optionIndex": 1, "text": "AFGHANISTAN - AFG"}, {"optionIndex": 2, "text": "ALBANIA - ALB"}, {"optionIndex": 3, "text": "ALGERIA - DZA"}, {"optionIndex": 4, "text": "AMERICAN SAMOA - ASM"}, {"optionIndex": 5, "text": "ANDORRA - AND"}, {"optionIndex": 6, "text": "ANGOLA - AGO"}, {"optionIndex": 7, "text": "ANGUILLA - AIA"}, {"optionIndex": 8, "text": "ANTIGUA AND BARBUDA - ATG"}, {"optionIndex": 9, "text": "ARGENTINA - ARG"}, {"optionIndex": 10, "text": "ARMENIA - ARM"}, {"optionIndex": 11, "text": "ARUBA - ABW"}, {"optionIndex": 12, "text": "AUSTRALIA - AUS"}, {"optionIndex": 13, "text": "AUSTRIA - AUT"}, {"optionIndex": 14, "text": "AZERBAIJAN - AZE"}, {"optionIndex": 15, "text": "BAHAMAS - BHS"}, {"optionIndex": 16, "text": "BAHRAIN - BHR"}, {"optionIndex": 17, "text": "BANGLADESH - BGD"}, {"optionIndex": 18, "text": "BARBADOS - BRB"}, {"optionIndex": 19, "text": "BELARUS - BLR"}, {"optionIndex": 20, "text": "BELGIUM - BEL"}, {"optionIndex": 21, "text": "BELIZE - BLZ"}, {"optionIndex": 22, "text": "BENIN - BEN"}, {"optionIndex": 23, "text": "BERMUDA - BMU"}, {"optionIndex": 24, "text": "BHUTAN - BTN"}, {"optionIndex": 25, "text": "BOLIVIA - BOL"}, {"optionIndex": 26, "text": "BONAIRE, SINT EUSTATIUS AND SABA - BES"}, {"optionIndex": 27, "text": "BOSNIA AND HERZEGOVINA - BIH"}, {"optionIndex": 28, "text": "BOTSWANA - BWA"}, {"optionIndex": 29, "text": "BRAZIL - BRA"}, {"optionIndex": 30, "text": "BRUNEI DARUSSALAM - BRN"}, {"optionIndex": 31, "text": "BULGARIA - BGR"}, {"optionIndex": 32, "text": "BURKINA FASO - BFA"}, {"optionIndex": 33, "text": "MYANMAR - MMR"}, {"optionIndex": 34, "text": "BURUNDI - BDI"}, {"optionIndex": 35, "text": "CABO VERDE - CPV"}, {"optionIndex": 36, "text": "CAMBODIA - KHM"}, {"optionIndex": 37, "text": "CAMEROON - CMR"}, {"optionIndex": 38, "text": "CANADA - CAN"}, {"optionIndex": 39, "text": "CAYMAN ISLANDS - CYM"}, {"optionIndex": 40, "text": "CENTRAL AFRICAN REPUBLIC - CAF"}, {"optionIndex": 41, "text": "CHAD - TCD"}, {"optionIndex": 42, "text": "CHILE - CHL"}, {"optionIndex": 43, "text": "CHINA - CHN"}, {"optionIndex": 44, "text": "COLOMBIA - COL"}, {"optionIndex": 45, "text": "COMOROS - COM"}, {"optionIndex": 46, "text": "CONGO - COG"}, {"optionIndex": 47, "text": "CONGO, DEMOCRATIC REPUBLIC OF THE - COD"}, {"optionIndex": 48, "text": "COOK ISLANDS - COK"}, {"optionIndex": 49, "text": "COSTA RICA - CRI"}, {"optionIndex": 50, "text": "COTE D'IVOIRE - CIV"}, {"optionIndex": 51, "text": "CROATIA - HRV"}, {"optionIndex": 52, "text": "CUBA - CUB"}, {"optionIndex": 53, "text": "CURACAO - CUW"}, {"optionIndex": 54, "text": "CYPRUS - CYP"}, {"optionIndex": 55, "text": "CZECHIA (CZECH REP) - CZE"}, {"optionIndex": 56, "text": "DENMARK - DNK"}, {"optionIndex": 57, "text": "DJIBOUTI - DJI"}, {"optionIndex": 58, "text": "DOMINICA - DMA"}, {"optionIndex": 59, "text": "DOMINICAN REPUBLIC - DOM"}, {"optionIndex": 60, "text": "EAST TIMOR - TMP"}, {"optionIndex": 61, "text": "ECUADOR - ECU"}, {"optionIndex": 62, "text": "EGYPT - EGY"}, {"optionIndex": 63, "text": "EL SALVADOR - SLV"}, {"optionIndex": 64, "text": "EQUATORIAL GUINEA - GNQ"}, {"optionIndex": 65, "text": "ERITREA - ERI"}, {"optionIndex": 66, "text": "ESTONIA - EST"}, {"optionIndex": 67, "text": "ESWATINI - SWZ"}, {"optionIndex": 68, "text": "ETHIOPIA - ETH"}, {"optionIndex": 69, "text": "FALKLAND ISLANDS (MALVINAS) - FLK"}, {"optionIndex": 70, "text": "FIJI - FJI"}, {"optionIndex": 71, "text": "FINLAND - FIN"}, {"optionIndex": 72, "text": "FRANCE - FRA"}, {"optionIndex": 73, "text": "FRENCH GUIANA - GUF"}, {"optionIndex": 74, "text": "FRENCH POLYNESIA - PYF"}, {"optionIndex": 75, "text": "GABON - GAB"}, {"optionIndex": 76, "text": "GAMBIA - GMB"}, {"optionIndex": 77, "text": "GEORGIA - GEO"}, {"optionIndex": 78, "text": "GERMANY - D"}, {"optionIndex": 79, "text": "GHANA - GHA"}, {"optionIndex": 80, "text": "GIBRALTAR - GIB"}, {"optionIndex": 81, "text": "GREECE - GRC"}, {"optionIndex": 82, "text": "GREENLAND - GRL"}, {"optionIndex": 83, "text": "GRENADA - GRD"}, {"optionIndex": 84, "text": "GUADELOUPE - GLP"}, {"optionIndex": 85, "text": "GUAM - GUM"}, {"optionIndex": 86, "text": "GUATEMALA - GTM"}, {"optionIndex": 87, "text": "GUINEA - GIN"}, {"optionIndex": 88, "text": "GUINEA-BISSAU - GNB"}, {"optionIndex": 89, "text": "GUYANA - GUY"}, {"optionIndex": 90, "text": "HAITI - HTI"}, {"optionIndex": 91, "text": "HONDURAS - HND"}, {"optionIndex": 92, "text": "HONG KONG SAR - HKG"}, {"optionIndex": 93, "text": "HUNGARY - HUN"}, {"optionIndex": 94, "text": "ICELAND - ISL"}, {"optionIndex": 95, "text": "INDIA - IND"}, {"optionIndex": 96, "text": "INDONESIA - IDN"}, {"optionIndex": 97, "text": "IRAN, ISLAMIC REPUBLIC OF - IRN"}, {"optionIndex": 98, "text": "IRAQ - IRQ"}, {"optionIndex": 99, "text": "IRELAND - IRL"}, {"optionIndex": 100, "text": "ISRAEL - ISR"}, {"optionIndex": 101, "text": "ITALY - ITA"}, {"optionIndex": 102, "text": "JAMAICA - JAM"}, {"optionIndex": 103, "text": "JAPAN - JPN"}, {"optionIndex": 104, "text": "JORDAN - JOR"}, {"optionIndex": 105, "text": "KAZAKHSTAN - KAZ"}, {"optionIndex": 106, "text": "KENYA - KEN"}, {"optionIndex": 107, "text": "KIRIBATI - KIR"}, {"optionIndex": 108, "text": "KOREA, DEMOCRATIC PEOPLES REPUBLIC OF (NORTH) - PRK"}, {"optionIndex": 109, "text": "KOREA, REPUBLIC OF (SOUTH) - KOR"}, {"optionIndex": 110, "text": "KOSOVO - RKS"}, {"optionIndex": 111, "text": "KUWAIT - KWT"}, {"optionIndex": 112, "text": "KYRGYZSTAN - KGZ"}, {"optionIndex": 113, "text": "LAO PEOPLE'S DEMOCRATIC REPUBLIC - LAO"}, {"optionIndex": 114, "text": "LATVIA - LVA"}, {"optionIndex": 115, "text": "LEBANON - LBN"}, {"optionIndex": 116, "text": "LESOTHO - LSO"}, {"optionIndex": 117, "text": "LIBERIA - LBR"}, {"optionIndex": 118, "text": "LIBYA - LBY"}, {"optionIndex": 119, "text": "LIECHTENSTEIN - LIE"}, {"optionIndex": 120, "text": "LITHUANIA - LTU"}, {"optionIndex": 121, "text": "LUXEMBOURG - LUX"}, {"optionIndex": 122, "text": "MACAU SAR - MAC"}, {"optionIndex": 123, "text": "MADAGASCAR - MDG"}, {"optionIndex": 124, "text": "MALAWI - MWI"}, {"optionIndex": 125, "text": "MALAYSIA - MYS"}, {"optionIndex": 126, "text": "MALDIVES - MDV"}, {"optionIndex": 127, "text": "MALI - MLI"}, {"optionIndex": 128, "text": "MALTA - MLT"}, {"optionIndex": 129, "text": "MARSHALL ISLANDS - MHL"}, {"optionIndex": 130, "text": "MARTINIQUE - MTQ"}, {"optionIndex": 131, "text": "MAURITANIA - MRT"}, {"optionIndex": 132, "text": "MAURITIUS - MUS"}, {"optionIndex": 133, "text": "MEXICO - MEX"}, {"optionIndex": 134, "text": "MICRONESIA, FEDERATED STATES OF - FSM"}, {"optionIndex": 135, "text": "MOLDOVA, REPUBLIC OF - MDA"}, {"optionIndex": 136, "text": "MONACO - MCO"}, {"optionIndex": 137, "text": "MONGOLIA - MNG"}, {"optionIndex": 138, "text": "MONTENEGRO - MNE"}, {"optionIndex": 139, "text": "MONTSERRAT - MSR"}, {"optionIndex": 140, "text": "MOROCCO - MAR"}, {"optionIndex": 141, "text": "MOZAMBIQUE - MOZ"}, {"optionIndex": 142, "text": "NAMIBIA - NAM"}, {"optionIndex": 143, "text": "NAURU - NRU"}, {"optionIndex": 144, "text": "NEPAL - NPL"}, {"optionIndex": 145, "text": "NETHERLANDS - NLD"}, {"optionIndex": 146, "text": "NETHERLANDS ANTILLES - ANT"}, {"optionIndex": 147, "text": "NEW CALEDONIA - NCL"}, {"optionIndex": 148, "text": "NEW ZEALAND - NZL"}, {"optionIndex": 149, "text": "NICARAGUA - NIC"}, {"optionIndex": 150, "text": "NIGER - NER"}, {"optionIndex": 151, "text": "NIGERIA - NGA"}, {"optionIndex": 152, "text": "NIUE - NIU"}, {"optionIndex": 153, "text": "NORTH MACEDONIA - MKD"}, {"optionIndex": 154, "text": "NORWAY - NOR"}, {"optionIndex": 155, "text": "OMAN - OMN"}, {"optionIndex": 156, "text": "PAKISTAN - PAK"}, {"optionIndex": 157, "text": "PALAU - PLW"}, {"optionIndex": 158, "text": "PALESTINIAN AUTHORITY - PSE"}, {"optionIndex": 159, "text": "PANAMA - PAN"}, {"optionIndex": 160, "text": "PAPUA NEW GUINEA - PNG"}, {"optionIndex": 161, "text": "PARAGUAY - PRY"}, {"optionIndex": 162, "text": "PERU - PER"}, {"optionIndex": 163, "text": "PHILIPPINES - PHL"}, {"optionIndex": 164, "text": "PITCAIRN - PCN"}, {"optionIndex": 165, "text": "POLAND - POL"}, {"optionIndex": 166, "text": "PORTUGAL - PRT"}, {"optionIndex": 167, "text": "PUERTO RICO - PRI"}, {"optionIndex": 168, "text": "QATAR - QAT"}, {"optionIndex": 169, "text": "REUNION - REU"}, {"optionIndex": 170, "text": "ROMANIA - ROU"}, {"optionIndex": 171, "text": "ROMANIA PRE 1/2/2002 - ROM"}, {"optionIndex": 172, "text": "RUSSIAN FEDERATION - RUS"}, {"optionIndex": 173, "text": "RWANDA - RWA"}, {"optionIndex": 174, "text": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA - SHN"}, {"optionIndex": 175, "text": "SAINT KITTS AND NEVIS - KNA"}, {"optionIndex": 176, "text": "SAINT LUCIA - LCA"}, {"optionIndex": 177, "text": "SAINT VINCENT AND THE GRENADINES - VCT"}, {"optionIndex": 178, "text": "SAMOA - WSM"}, {"optionIndex": 179, "text": "SAN MARINO - SMR"}, {"optionIndex": 180, "text": "SAO TOME AND PRINCIPE - STP"}, {"optionIndex": 181, "text": "SAUDI ARABIA - SAU"}, {"optionIndex": 182, "text": "SENEGAL - SEN"}, {"optionIndex": 183, "text": "SERBIA - SRB"}, {"optionIndex": 184, "text": "SERBIA AND MONTENEGRO - SCG"}, {"optionIndex": 185, "text": "SEYCHELLES - SYC"}, {"optionIndex": 186, "text": "SIERRA LEONE - SLE"}, {"optionIndex": 187, "text": "SINGAPORE - SGP"}, {"optionIndex": 188, "text": "SINT MAARTEN (DUTCH PART) - SXM"}, {"optionIndex": 189, "text": "SLOVAK REPUBLIC - SVK"}, {"optionIndex": 190, "text": "SLOVENIA - SVN"}, {"optionIndex": 191, "text": "SOLOMON ISLANDS - SLB"}, {"optionIndex": 192, "text": "SOMALIA - SOM"}, {"optionIndex": 193, "text": "SOUTH AFRICA - ZAF"}, {"optionIndex": 194, "text": "SOUTH SUDAN - SSD"}, {"optionIndex": 195, "text": "SPAIN - ESP"}, {"optionIndex": 196, "text": "SRI LANKA - LKA"}, {"optionIndex": 197, "text": "SUDAN - SDN"}, {"optionIndex": 198, "text": "SURINAME - SUR"}, {"optionIndex": 199, "text": "SWEDEN - SWE"}, {"optionIndex": 200, "text": "SWITZERLAND - CHE"}, {"optionIndex": 201, "text": "SYRIAN ARAB REPUBLIC - SYR"}, {"optionIndex": 202, "text": "TAIWAN - TWN"}, {"optionIndex": 203, "text": "TAJIKISTAN - TJK"}, {"optionIndex": 204, "text": "TANZANIA, UNITED REPUBLIC OF - TZA"}, {"optionIndex": 205, "text": "THAILAND - THA"}, {"optionIndex": 206, "text": "TIMOR-LESTE - TLS"}, {"optionIndex": 207, "text": "TOGO - TGO"}, {"optionIndex": 208, "text": "TOKELAU - TKL"}, {"optionIndex": 209, "text": "TONGA - TON"}, {"optionIndex": 210, "text": "TRINIDAD AND TOBAGO - TTO"}, {"optionIndex": 211, "text": "TUNISIA - TUN"}, {"optionIndex": 212, "text": "TURKIYE - TUR"}, {"optionIndex": 213, "text": "TURKMENISTAN - TKM"}, {"optionIndex": 214, "text": "TURKS AND CAICOS ISLANDS - TCA"}, {"optionIndex": 215, "text": "TUVALU - TUV"}, {"optionIndex": 216, "text": "UGANDA - UGA"}, {"optionIndex": 217, "text": "UKRAINE - UKR"}, {"optionIndex": 218, "text": "UNITED ARAB EMIRATES - ARE"}, {"optionIndex": 219, "text": "UNITED KINGDOM - BRITISH CITIZEN - GBR"}, {"optionIndex": 220, "text": "UNITED KINGDOM - BRITISH NATIONAL (OVERSEAS) - GBN"}, {"optionIndex": 221, "text": "UNITED KINGDOM - BRITISH OVERSEAS CITIZEN - GBO"}, {"optionIndex": 222, "text": "UNITED KINGDOM - BRITISH OVERSEAS TERRITORIES CITIZEN - GBD"}, {"optionIndex": 223, "text": "UNITED KINGDOM - BRITISH SUBJECT - GBS"}, {"optionIndex": 224, "text": "UNITED STATES - USA"}, {"optionIndex": 225, "text": "URUGUAY - URY"}, {"optionIndex": 226, "text": "UZBEKISTAN - UZB"}, {"optionIndex": 227, "text": "VANUATU - VUT"}, {"optionIndex": 228, "text": "VATICAN CITY STATE (HOLY SEE) - VAT"}, {"optionIndex": 229, "text": "VENEZUELA - VEN"}, {"optionIndex": 230, "text": "VIET NAM - VNM"}, {"optionIndex": 231, "text": "VIRGIN ISLANDS (BRITISH) - VGB"}, {"optionIndex": 232, "text": "YEMEN, REPUBLIC OF - YEM"}, {"optionIndex": 233, "text": "YUGOSLAVIA - YUG"}, {"optionIndex": 234, "text": "ZAIRE - ZAR"}, {"optionIndex": 235, "text": "ZAMBIA - ZMB"}, {"optionIndex": 236, "text": "ZIMBABWE - ZWE"}]}, "text": "AFGHANISTAN - AFGALBANIA - ALBALGERIA - DZAAMERICAN SAMOA - ASMANDORRA - ANDANGOLA - AGOANGUILLA - AIAANTIGUA AND BARBUDA - ATGARGENTINA - ARGARMENIA - ARMARUBA - ABWAUSTRALIA - AUSAUSTRIA - AUTAZERBAIJAN - AZEBAHAMAS - BHSBAHRAIN - BHRBANGLADESH - BGDBARBADOS - BRBBELARUS - BLRBELGIUM - BELBELIZE - BLZBENIN - BENBERMUDA - BMUBHUTAN - BTNBOLIVIA - BOLBONAIRE, SINT EUSTATIUS AND SABA - BESBOSNIA AND HERZEGOVINA - BIHBOTSWANA - BWABRAZIL - BRABRUNEI DARUSSALAM - BRNBULGARIA - BGRBURKINA FASO - BFAMYANMAR - MMRBURUNDI - BDICABO VERDE - CPVCAMBODIA - KHMCAMEROON - CMRCANADA - CANCAYMAN ISLANDS - CYMCENTRAL AFRICAN REPUBLIC - CAFCHAD - TCDCHILE - CHLCHINA - CHNCOLOMBIA - COLCOMOROS - COMCONGO - COGCONGO, DEMOCRATIC REPUBLIC OF THE - CODCOOK ISLANDS - COKCOSTA RICA - CRICOTE D'IVOIRE - CIVCROATIA - HRVCUBA - CUBCURACAO - CUWCYPRUS - CYPCZECHIA (CZECH REP) - CZEDENMARK - DNKDJIBOUTI - DJIDOMINICA - DMADOMINICAN REPUBLIC - DOMEAST TIMOR - TMPECUADOR - ECUEGYPT - EGYEL SALVADOR - SLVEQUATORIAL GUINEA - GNQERITREA - ERIESTONIA - ESTESWATINI - SWZETHIOPIA - ETHFALKLAND ISLANDS (MALVINAS) - FLKFIJI - FJIFINLAND - FINFRANCE - FRAFRENCH GUIANA - GUFFRENCH POLYNESIA - PYFGABON - GABGAMBIA - GMBGEORGIA - GEOGERMANY - DGHANA - GHAGIBRALTAR - GIBGREECE - GRCGREENLAND - GRLGRENADA - GRDGUADELOUPE - GLPGUAM - GUMGUATEMALA - GTMGUINEA - GINGUINEA-BISSAU - GNBGUYANA - GUYHAITI - HTIHONDURAS - HNDHONG KONG SAR - HKGHUNGARY - HUNICELAND - ISLINDIA - INDINDONESIA - IDNIRAN, ISLAMIC REPUBLIC OF - IRNIRAQ - IRQIRELAND - IRLISRAEL - ISRITALY - ITAJAMAICA - JAMJAPAN - JPNJORDAN - JORKAZAKHSTAN - KAZKENYA - KENKIRIBATI - KIRKOREA, DEMOCRATIC PEOPLES REPUBLIC OF (NORTH) - PRKKOREA, REPUBLIC OF (SOUTH) - KORKOSOVO - RKSKUWAIT - KWTKYRGYZSTAN - KGZLAO PEOPLE'S DEMOCRATIC REPUBLIC - LAOLATVIA - LVALEBANON - LBNLESOTHO - LSOLIBERIA - LBRLIBYA - LBYLIECHTENSTEIN - LIELITHUANIA - LTULUXEMBOURG - LUXMACAU SAR - MACMADAGASCAR - MDGMALAWI - MWIMALAYSIA - MYSMALDIVES - MDVMALI - MLIMALTA - MLTMARSHALL ISLANDS - MHLMARTINIQUE - MTQMAURITANIA - MRTMAURITIUS - MUSMEXICO - MEXMICRONESIA, FEDERATED STATES OF - FSMMOLDOVA, REPUBLIC OF - MDAMONACO - MCOMONGOLIA - MNGMONTENEGRO - MNEMONTSERRAT - MSRMOROCCO - MARMOZAMBIQUE - MOZNAMIBIA - NAMNAURU - NRUNEPAL - NPLNETHERLANDS - NLDNETHERLANDS ANTILLES - ANTNEW CALEDONIA - NCLNEW ZEALAND - NZLNICARAGUA - NICNIGER - NERNIGERIA - NGANIUE - NIUNORTH MACEDONIA - MKDNORWAY - NOROMAN - OMNPAKISTAN - PAKPALAU - PLWPALESTINIAN AUTHORITY - PSEPANAMA - PANPAPUA NEW GUINEA - PNGPARAGUAY - PRYPERU - PERPHILIPPINES - PHLPITCAIRN - PCNPOLAND - POLPORTUGAL - PRTPUERTO RICO - PRIQATAR - QATREUNION - REUROMANIA - ROUROMANIA PRE 1/2/2002 - ROMRUSSIAN FEDERATION - RUSRWANDA - RWASAINT HELENA, ASCENSION AND TRISTAN DA CUNHA - SHNSAINT KITTS AND NEVIS - KNASAINT LUCIA - LCASAINT VINCENT AND THE GRENADINES - VCTSAMOA - WSMSAN MARINO - SMRSAO TOME AND PRINCIPE - STPSAUDI ARABIA - SAUSENEGAL - SENSERBIA - SRBSERBIA AND MONTENEGRO - SCGSEYCHELLES - SYCSIERRA LEONE - SLESINGAPORE - SGPSINT MAARTEN (DUTCH PART) - SXMSLOVAK REPUBLIC - SVKSLOVENIA - SVNSOLOMON ISLANDS - SLBSOMALIA - SOMSOUTH AFRICA - ZAFSOUTH SUDAN - SSDSPAIN - ESPSRI LANKA - LKASUDAN - SDNSURINAME - SURSWEDEN - SWESWITZERLAND - CHESYRIAN ARAB REPUBLIC - SYRTAIWAN - TWNTAJIKISTAN - TJKTANZANIA, UNITED REPUBLIC OF - TZATHAILAND - THATIMOR-LESTE - TLSTOGO - TGOTOKELAU - TKLTONGA - TONTRINIDAD AND TOBAGO - TTOTUNISIA - TUNTURKIYE - TURTURKMENISTAN - TKMTURKS AND CAICOS ISLANDS - TCATUVALU - TUVUGANDA - UGAUKRAINE - UKRUNITED ARAB EMIRATES - AREUNITED KINGDOM - BRITISH CITIZEN - GBRUNITED KINGDOM - BRITISH NATIONAL (OVERSEAS) - GBNUNITED KINGDOM - BRITISH OVERSEAS CITIZEN - GBOUNITED KINGDOM - BRITISH OVERSEAS TERRITORIES CITIZEN - GBDUNITED KINGDOM - BRITISH SUBJECT - GBSUNITED STATES - USAURUGUAY - URYUZBEKISTAN - UZBVANUATU - VUTVATICAN CITY STATE (HOLY SEE) - VATVENEZUELA - VENVIET NAM - VNMVIRGIN ISLANDS (BRITISH) - VGBYEMEN, REPUBLIC OF - YEMYUGOSLAVIA - YUGZAIRE - ZARZAMBIA - ZMBZIMBABWE - ZWE", "children": [{"id": 261, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "", "data-wc-null": "1", "selected": "selected", "unique_id": "261"}, "text": "", "children": []}, {"id": 262, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AFG", "unique_id": "262"}, "text": "AFGHANISTAN - AFG", "children": []}, {"id": 263, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ALB", "unique_id": "263"}, "text": "ALBANIA - ALB", "children": []}, {"id": 264, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DZA", "unique_id": "264"}, "text": "ALGERIA - DZA", "children": []}, {"id": 265, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ASM", "unique_id": "265"}, "text": "AMERICAN SAMOA - ASM", "children": []}, {"id": 266, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AND", "unique_id": "266"}, "text": "ANDORRA - AND", "children": []}, {"id": 267, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AGO", "unique_id": "267"}, "text": "ANGOLA - AGO", "children": []}, {"id": 268, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AIA", "unique_id": "268"}, "text": "ANGUILLA - AIA", "children": []}, {"id": 269, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ATG", "unique_id": "269"}, "text": "ANTIGUA AND BARBUDA - ATG", "children": []}, {"id": 270, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARG", "unique_id": "270"}, "text": "ARGENTINA - ARG", "children": []}, {"id": 271, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARM", "unique_id": "271"}, "text": "ARMENIA - ARM", "children": []}, {"id": 272, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ABW", "unique_id": "272"}, "text": "ARUBA - ABW", "children": []}, {"id": 273, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AUS", "unique_id": "273"}, "text": "AUSTRALIA - AUS", "children": []}, {"id": 274, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AUT", "unique_id": "274"}, "text": "AUSTRIA - AUT", "children": []}, {"id": 275, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AZE", "unique_id": "275"}, "text": "AZERBAIJAN - AZE", "children": []}, {"id": 276, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BHS", "unique_id": "276"}, "text": "BAHAMAS - BHS", "children": []}, {"id": 277, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BHR", "unique_id": "277"}, "text": "BAHRAIN - BHR", "children": []}, {"id": 278, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BGD", "unique_id": "278"}, "text": "BANGLADESH - BGD", "children": []}, {"id": 279, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRB", "unique_id": "279"}, "text": "BARBADOS - BRB", "children": []}, {"id": 280, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BLR", "unique_id": "280"}, "text": "BELARUS - BLR", "children": []}, {"id": 281, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BEL", "unique_id": "281"}, "text": "BELGIUM - BEL", "children": []}, {"id": 282, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BLZ", "unique_id": "282"}, "text": "BELIZE - BLZ", "children": []}, {"id": 283, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BEN", "unique_id": "283"}, "text": "BENIN - BEN", "children": []}, {"id": 284, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BMU", "unique_id": "284"}, "text": "BERMUDA - BMU", "children": []}, {"id": 285, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BTN", "unique_id": "285"}, "text": "BHUTAN - BTN", "children": []}, {"id": 286, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BOL", "unique_id": "286"}, "text": "BOLIVIA - BOL", "children": []}, {"id": 287, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BES", "unique_id": "287"}, "text": "BONAIRE, SINT EUSTATIUS AND SABA - BES", "children": []}, {"id": 288, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BIH", "unique_id": "288"}, "text": "BOSNIA AND HERZEGOVINA - BIH", "children": []}, {"id": 289, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BWA", "unique_id": "289"}, "text": "BOTSWANA - BWA", "children": []}, {"id": 290, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRA", "unique_id": "290"}, "text": "BRAZIL - BRA", "children": []}, {"id": 291, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRN", "unique_id": "291"}, "text": "BRUNEI DARUSSALAM - BRN", "children": []}, {"id": 292, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BGR", "unique_id": "292"}, "text": "BULGARIA - BGR", "children": []}, {"id": 293, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BFA", "unique_id": "293"}, "text": "BURKINA FASO - BFA", "children": []}, {"id": 294, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MMR", "unique_id": "294"}, "text": "MYANMAR - MMR", "children": []}, {"id": 295, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BDI", "unique_id": "295"}, "text": "BURUNDI - BDI", "children": []}, {"id": 296, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CPV", "unique_id": "296"}, "text": "CABO VERDE - CPV", "children": []}, {"id": 297, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KHM", "unique_id": "297"}, "text": "CAMBODIA - KHM", "children": []}, {"id": 298, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CMR", "unique_id": "298"}, "text": "CAMEROON - CMR", "children": []}, {"id": 299, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CAN", "unique_id": "299"}, "text": "CANADA - CAN", "children": []}, {"id": 300, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CYM", "unique_id": "300"}, "text": "CAYMAN ISLANDS - CYM", "children": []}, {"id": 301, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CAF", "unique_id": "301"}, "text": "CENTRAL AFRICAN REPUBLIC - CAF", "children": []}, {"id": 302, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TCD", "unique_id": "302"}, "text": "CHAD - TCD", "children": []}, {"id": 303, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHL", "unique_id": "303"}, "text": "CHILE - CHL", "children": []}, {"id": 304, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHN", "unique_id": "304"}, "text": "CHINA - CHN", "children": []}, {"id": 305, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COL", "unique_id": "305"}, "text": "COLOMBIA - COL", "children": []}, {"id": 306, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COM", "unique_id": "306"}, "text": "COMOROS - COM", "children": []}, {"id": 307, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COG", "unique_id": "307"}, "text": "CONGO - COG", "children": []}, {"id": 308, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COD", "unique_id": "308"}, "text": "CONGO, DEMOCRATIC REPUBLIC OF THE - COD", "children": []}, {"id": 309, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COK", "unique_id": "309"}, "text": "COOK ISLANDS - COK", "children": []}, {"id": 310, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CRI", "unique_id": "310"}, "text": "COSTA RICA - CRI", "children": []}, {"id": 311, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CIV", "unique_id": "311"}, "text": "COTE D'IVOIRE - CIV", "children": []}, {"id": 312, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HRV", "unique_id": "312"}, "text": "CROATIA - HRV", "children": []}, {"id": 313, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CUB", "unique_id": "313"}, "text": "CUBA - CUB", "children": []}, {"id": 314, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CUW", "unique_id": "314"}, "text": "CURACAO - CUW", "children": []}, {"id": 315, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CYP", "unique_id": "315"}, "text": "CYPRUS - CYP", "children": []}, {"id": 316, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CZE", "unique_id": "316"}, "text": "CZECHIA (CZECH REP) - CZE", "children": []}, {"id": 317, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DNK", "unique_id": "317"}, "text": "DENMARK - DNK", "children": []}, {"id": 318, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DJI", "unique_id": "318"}, "text": "DJIBOUTI - DJI", "children": []}, {"id": 319, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DMA", "unique_id": "319"}, "text": "DOMINICA - DMA", "children": []}, {"id": 320, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DOM", "unique_id": "320"}, "text": "DOMINICAN REPUBLIC - DOM", "children": []}, {"id": 321, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TMP", "unique_id": "321"}, "text": "EAST TIMOR - TMP", "children": []}, {"id": 322, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ECU", "unique_id": "322"}, "text": "ECUADOR - ECU", "children": []}, {"id": 323, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "EGY", "unique_id": "323"}, "text": "EGYPT - EGY", "children": []}, {"id": 324, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLV", "unique_id": "324"}, "text": "EL SALVADOR - SLV", "children": []}, {"id": 325, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GNQ", "unique_id": "325"}, "text": "EQUATORIAL GUINEA - GNQ", "children": []}, {"id": 326, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ERI", "unique_id": "326"}, "text": "ERITREA - ERI", "children": []}, {"id": 327, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "EST", "unique_id": "327"}, "text": "ESTONIA - EST", "children": []}, {"id": 328, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWZ", "unique_id": "328"}, "text": "ESWATINI - SWZ", "children": []}, {"id": 329, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ETH", "unique_id": "329"}, "text": "ETHIOPIA - ETH", "children": []}, {"id": 330, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FLK", "unique_id": "330"}, "text": "FALKLAND ISLANDS (MALVINAS) - FLK", "children": []}, {"id": 331, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FJI", "unique_id": "331"}, "text": "FIJI - FJI", "children": []}, {"id": 332, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FIN", "unique_id": "332"}, "text": "FINLAND - FIN", "children": []}, {"id": 333, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FRA", "unique_id": "333"}, "text": "FRANCE - FRA", "children": []}, {"id": 334, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUF", "unique_id": "334"}, "text": "FRENCH GUIANA - GUF", "children": []}, {"id": 335, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PYF", "unique_id": "335"}, "text": "FRENCH POLYNESIA - PYF", "children": []}, {"id": 336, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GAB", "unique_id": "336"}, "text": "GABON - GAB", "children": []}, {"id": 337, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GMB", "unique_id": "337"}, "text": "GAMBIA - GMB", "children": []}, {"id": 338, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GEO", "unique_id": "338"}, "text": "GEORGIA - GEO", "children": []}, {"id": 339, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "D", "unique_id": "339"}, "text": "GERMANY - D", "children": []}, {"id": 340, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GHA", "unique_id": "340"}, "text": "GHANA - GHA", "children": []}, {"id": 341, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GIB", "unique_id": "341"}, "text": "GIBRALTAR - GIB", "children": []}, {"id": 342, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRC", "unique_id": "342"}, "text": "GREECE - GRC", "children": []}, {"id": 343, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRL", "unique_id": "343"}, "text": "GREENLAND - GRL", "children": []}, {"id": 344, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRD", "unique_id": "344"}, "text": "GRENADA - GRD", "children": []}, {"id": 345, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GLP", "unique_id": "345"}, "text": "GUADELOUPE - GLP", "children": []}, {"id": 346, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUM", "unique_id": "346"}, "text": "GUAM - GUM", "children": []}, {"id": 347, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GTM", "unique_id": "347"}, "text": "GUATEMALA - GTM", "children": []}, {"id": 348, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GIN", "unique_id": "348"}, "text": "GUINEA - GIN", "children": []}, {"id": 349, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GNB", "unique_id": "349"}, "text": "GUINEA-BISSAU - GNB", "children": []}, {"id": 350, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUY", "unique_id": "350"}, "text": "GUYANA - GUY", "children": []}, {"id": 351, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HTI", "unique_id": "351"}, "text": "HAITI - HTI", "children": []}, {"id": 352, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HND", "unique_id": "352"}, "text": "HONDURAS - HND", "children": []}, {"id": 353, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HKG", "unique_id": "353"}, "text": "HONG KONG SAR - HKG", "children": []}, {"id": 354, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HUN", "unique_id": "354"}, "text": "HUNGARY - HUN", "children": []}, {"id": 355, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ISL", "unique_id": "355"}, "text": "ICELAND - ISL", "children": []}, {"id": 356, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IND", "unique_id": "356"}, "text": "INDIA - IND", "children": []}, {"id": 357, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IDN", "unique_id": "357"}, "text": "INDONESIA - IDN", "children": []}, {"id": 358, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRN", "unique_id": "358"}, "text": "IRAN, ISLAMIC REPUBLIC OF - IRN", "children": []}, {"id": 359, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRQ", "unique_id": "359"}, "text": "IRAQ - IRQ", "children": []}, {"id": 360, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRL", "unique_id": "360"}, "text": "IRELAND - IRL", "children": []}, {"id": 361, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ISR", "unique_id": "361"}, "text": "ISRAEL - ISR", "children": []}, {"id": 362, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ITA", "unique_id": "362"}, "text": "ITALY - ITA", "children": []}, {"id": 363, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JAM", "unique_id": "363"}, "text": "JAMAICA - JAM", "children": []}, {"id": 364, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JPN", "unique_id": "364"}, "text": "JAPAN - JPN", "children": []}, {"id": 365, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JOR", "unique_id": "365"}, "text": "JORDAN - JOR", "children": []}, {"id": 366, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KAZ", "unique_id": "366"}, "text": "KAZAKHSTAN - KAZ", "children": []}, {"id": 367, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KEN", "unique_id": "367"}, "text": "KENYA - KEN", "children": []}, {"id": 368, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KIR", "unique_id": "368"}, "text": "KIRIBATI - KIR", "children": []}, {"id": 369, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRK", "unique_id": "369"}, "text": "KOREA, DEMOCRATIC PEOPLES REPUBLIC OF (NORTH) - PRK", "children": []}, {"id": 370, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KOR", "unique_id": "370"}, "text": "KOREA, REPUBLIC OF (SOUTH) - KOR", "children": []}, {"id": 371, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RKS", "unique_id": "371"}, "text": "KOSOVO - RKS", "children": []}, {"id": 372, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KWT", "unique_id": "372"}, "text": "KUWAIT - KWT", "children": []}, {"id": 373, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KGZ", "unique_id": "373"}, "text": "KYRGYZSTAN - KGZ", "children": []}, {"id": 374, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LAO", "unique_id": "374"}, "text": "LAO PEOPLE'S DEMOCRATIC REPUBLIC - LAO", "children": []}, {"id": 375, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LVA", "unique_id": "375"}, "text": "LATVIA - LVA", "children": []}, {"id": 376, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LBN", "unique_id": "376"}, "text": "LEBANON - LBN", "children": []}, {"id": 377, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LSO", "unique_id": "377"}, "text": "LESOTHO - LSO", "children": []}, {"id": 378, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LBR", "unique_id": "378"}, "text": "LIBERIA - LBR", "children": []}, {"id": 379, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LBY", "unique_id": "379"}, "text": "LIBYA - LBY", "children": []}, {"id": 380, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LIE", "unique_id": "380"}, "text": "LIECHTENSTEIN - LIE", "children": []}, {"id": 381, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LTU", "unique_id": "381"}, "text": "LITHUANIA - LTU", "children": []}, {"id": 382, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LUX", "unique_id": "382"}, "text": "LUXEMBOURG - LUX", "children": []}, {"id": 383, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAC", "unique_id": "383"}, "text": "MACAU SAR - MAC", "children": []}, {"id": 384, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MDG", "unique_id": "384"}, "text": "MADAGASCAR - MDG", "children": []}, {"id": 385, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MWI", "unique_id": "385"}, "text": "MALAWI - MWI", "children": []}, {"id": 386, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MYS", "unique_id": "386"}, "text": "MALAYSIA - MYS", "children": []}, {"id": 387, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MDV", "unique_id": "387"}, "text": "MALDIVES - MDV", "children": []}, {"id": 388, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MLI", "unique_id": "388"}, "text": "MALI - MLI", "children": []}, {"id": 389, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MLT", "unique_id": "389"}, "text": "MALTA - MLT", "children": []}, {"id": 390, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MHL", "unique_id": "390"}, "text": "MARSHALL ISLANDS - MHL", "children": []}, {"id": 391, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MTQ", "unique_id": "391"}, "text": "MARTINIQUE - MTQ", "children": []}, {"id": 392, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MRT", "unique_id": "392"}, "text": "MAURITANIA - MRT", "children": []}, {"id": 393, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MUS", "unique_id": "393"}, "text": "MAURITIUS - MUS", "children": []}, {"id": 394, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MEX", "unique_id": "394"}, "text": "MEXICO - MEX", "children": []}, {"id": 395, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FSM", "unique_id": "395"}, "text": "MICRONESIA, FEDERATED STATES OF - FSM", "children": []}, {"id": 396, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MDA", "unique_id": "396"}, "text": "MOLDOVA, REPUBLIC OF - MDA", "children": []}, {"id": 397, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MCO", "unique_id": "397"}, "text": "MONACO - MCO", "children": []}, {"id": 398, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MNG", "unique_id": "398"}, "text": "MONGOLIA - MNG", "children": []}, {"id": 399, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MNE", "unique_id": "399"}, "text": "MONTENEGRO - MNE", "children": []}, {"id": 400, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MSR", "unique_id": "400"}, "text": "MONTSERRAT - MSR", "children": []}, {"id": 401, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAR", "unique_id": "401"}, "text": "MOROCCO - MAR", "children": []}, {"id": 402, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MOZ", "unique_id": "402"}, "text": "MOZAMBIQUE - MOZ", "children": []}, {"id": 403, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NAM", "unique_id": "403"}, "text": "NAMIBIA - NAM", "children": []}, {"id": 404, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NRU", "unique_id": "404"}, "text": "NAURU - NRU", "children": []}, {"id": 405, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NPL", "unique_id": "405"}, "text": "NEPAL - NPL", "children": []}, {"id": 406, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NLD", "unique_id": "406"}, "text": "NETHERLANDS - NLD", "children": []}, {"id": 407, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ANT", "unique_id": "407"}, "text": "NETHERLANDS ANTILLES - ANT", "children": []}, {"id": 408, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NCL", "unique_id": "408"}, "text": "NEW CALEDONIA - NCL", "children": []}, {"id": 409, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NZL", "unique_id": "409"}, "text": "NEW ZEALAND - NZL", "children": []}, {"id": 410, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NIC", "unique_id": "410"}, "text": "NICARAGUA - NIC", "children": []}, {"id": 411, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NER", "unique_id": "411"}, "text": "NIGER - NER", "children": []}, {"id": 412, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NGA", "unique_id": "412"}, "text": "NIGERIA - NGA", "children": []}, {"id": 413, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NIU", "unique_id": "413"}, "text": "NIUE - NIU", "children": []}, {"id": 414, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MKD", "unique_id": "414"}, "text": "NORTH MACEDONIA - MKD", "children": []}, {"id": 415, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NOR", "unique_id": "415"}, "text": "NORWAY - NOR", "children": []}, {"id": 416, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "OMN", "unique_id": "416"}, "text": "OMAN - OMN", "children": []}, {"id": 417, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PAK", "unique_id": "417"}, "text": "PAKISTAN - PAK", "children": []}, {"id": 418, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PLW", "unique_id": "418"}, "text": "PALAU - PLW", "children": []}, {"id": 419, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PSE", "unique_id": "419"}, "text": "PALESTINIAN AUTHORITY - PSE", "children": []}, {"id": 420, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PAN", "unique_id": "420"}, "text": "PANAMA - PAN", "children": []}, {"id": 421, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PNG", "unique_id": "421"}, "text": "PAPUA NEW GUINEA - PNG", "children": []}, {"id": 422, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRY", "unique_id": "422"}, "text": "PARAGUAY - PRY", "children": []}, {"id": 423, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PER", "unique_id": "423"}, "text": "PERU - PER", "children": []}, {"id": 424, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PHL", "unique_id": "424"}, "text": "PHILIPPINES - PHL", "children": []}, {"id": 425, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PCN", "unique_id": "425"}, "text": "PITCAIRN - PCN", "children": []}, {"id": 426, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "POL", "unique_id": "426"}, "text": "POLAND - POL", "children": []}, {"id": 427, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRT", "unique_id": "427"}, "text": "PORTUGAL - PRT", "children": []}, {"id": 428, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRI", "unique_id": "428"}, "text": "PUERTO RICO - PRI", "children": []}, {"id": 429, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "QAT", "unique_id": "429"}, "text": "QATAR - QAT", "children": []}, {"id": 430, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "REU", "unique_id": "430"}, "text": "REUNION - REU", "children": []}, {"id": 431, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ROU", "unique_id": "431"}, "text": "ROMANIA - ROU", "children": []}, {"id": 432, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ROM", "unique_id": "432"}, "text": "ROMANIA PRE 1/2/2002 - ROM", "children": []}, {"id": 433, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RUS", "unique_id": "433"}, "text": "RUSSIAN FEDERATION - RUS", "children": []}, {"id": 434, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RWA", "unique_id": "434"}, "text": "RWANDA - RWA", "children": []}, {"id": 435, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SHN", "unique_id": "435"}, "text": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA - SHN", "children": []}, {"id": 436, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KNA", "unique_id": "436"}, "text": "SAINT KITTS AND NEVIS - KNA", "children": []}, {"id": 437, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LCA", "unique_id": "437"}, "text": "SAINT LUCIA - LCA", "children": []}, {"id": 438, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VCT", "unique_id": "438"}, "text": "SAINT VINCENT AND THE GRENADINES - VCT", "children": []}, {"id": 439, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "WSM", "unique_id": "439"}, "text": "SAMOA - WSM", "children": []}, {"id": 440, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SMR", "unique_id": "440"}, "text": "SAN MARINO - SMR", "children": []}, {"id": 441, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STP", "unique_id": "441"}, "text": "SAO TOME AND PRINCIPE - STP", "children": []}, {"id": 442, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SAU", "unique_id": "442"}, "text": "SAUDI ARABIA - SAU", "children": []}, {"id": 443, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SEN", "unique_id": "443"}, "text": "SENEGAL - SEN", "children": []}, {"id": 444, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SRB", "unique_id": "444"}, "text": "SERBIA - SRB", "children": []}, {"id": 445, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SCG", "unique_id": "445"}, "text": "SERBIA AND MONTENEGRO - SCG", "children": []}, {"id": 446, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SYC", "unique_id": "446"}, "text": "SEYCHELLES - SYC", "children": []}, {"id": 447, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLE", "unique_id": "447"}, "text": "SIERRA LEONE - SLE", "children": []}, {"id": 448, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SGP", "unique_id": "448"}, "text": "SINGAPORE - SGP", "children": []}, {"id": 449, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SXM", "unique_id": "449"}, "text": "SINT MAARTEN (DUTCH PART) - SXM", "children": []}, {"id": 450, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SVK", "unique_id": "450"}, "text": "SLOVAK REPUBLIC - SVK", "children": []}, {"id": 451, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SVN", "unique_id": "451"}, "text": "SLOVENIA - SVN", "children": []}, {"id": 452, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLB", "unique_id": "452"}, "text": "SOLOMON ISLANDS - SLB", "children": []}, {"id": 453, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SOM", "unique_id": "453"}, "text": "SOMALIA - SOM", "children": []}, {"id": 454, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZAF", "unique_id": "454"}, "text": "SOUTH AFRICA - ZAF", "children": []}, {"id": 455, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SSD", "unique_id": "455"}, "text": "SOUTH SUDAN - SSD", "children": []}, {"id": 456, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ESP", "unique_id": "456"}, "text": "SPAIN - ESP", "children": []}, {"id": 457, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LKA", "unique_id": "457"}, "text": "SRI LANKA - LKA", "children": []}, {"id": 458, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SDN", "unique_id": "458"}, "text": "SUDAN - SDN", "children": []}, {"id": 459, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SUR", "unique_id": "459"}, "text": "SURINAME - SUR", "children": []}, {"id": 460, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWE", "unique_id": "460"}, "text": "SWEDEN - SWE", "children": []}, {"id": 461, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHE", "unique_id": "461"}, "text": "SWITZERLAND - CHE", "children": []}, {"id": 462, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SYR", "unique_id": "462"}, "text": "SYRIAN ARAB REPUBLIC - SYR", "children": []}, {"id": 463, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TWN", "unique_id": "463"}, "text": "TAIWAN - TWN", "children": []}, {"id": 464, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TJK", "unique_id": "464"}, "text": "TAJIKISTAN - TJK", "children": []}, {"id": 465, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TZA", "unique_id": "465"}, "text": "TANZANIA, UNITED REPUBLIC OF - TZA", "children": []}, {"id": 466, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "THA", "unique_id": "466"}, "text": "THAILAND - THA", "children": []}, {"id": 467, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TLS", "unique_id": "467"}, "text": "TIMOR-LESTE - TLS", "children": []}, {"id": 468, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TGO", "unique_id": "468"}, "text": "TOGO - TGO", "children": []}, {"id": 469, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TKL", "unique_id": "469"}, "text": "TOKELAU - TKL", "children": []}, {"id": 470, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TON", "unique_id": "470"}, "text": "TONGA - TON", "children": []}, {"id": 471, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TTO", "unique_id": "471"}, "text": "TRINIDAD AND TOBAGO - TTO", "children": []}, {"id": 472, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUN", "unique_id": "472"}, "text": "TUNISIA - TUN", "children": []}, {"id": 473, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUR", "unique_id": "473"}, "text": "TURKIYE - TUR", "children": []}, {"id": 474, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TKM", "unique_id": "474"}, "text": "TURKMENISTAN - TKM", "children": []}, {"id": 475, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TCA", "unique_id": "475"}, "text": "TURKS AND CAICOS ISLANDS - TCA", "children": []}, {"id": 476, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUV", "unique_id": "476"}, "text": "TUVALU - TUV", "children": []}, {"id": 477, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UGA", "unique_id": "477"}, "text": "UGANDA - UGA", "children": []}, {"id": 478, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UKR", "unique_id": "478"}, "text": "UKRAINE - UKR", "children": []}, {"id": 479, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARE", "unique_id": "479"}, "text": "UNITED ARAB EMIRATES - ARE", "children": []}, {"id": 480, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBR", "unique_id": "480"}, "text": "UNITED KINGDOM - BRITISH CITIZEN - GBR", "children": []}, {"id": 481, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBN", "unique_id": "481"}, "text": "UNITED KINGDOM - BRITISH NATIONAL (OVERSEAS) - GBN", "children": []}, {"id": 482, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBO", "unique_id": "482"}, "text": "UNITED KINGDOM - BRITISH OVERSEAS CITIZEN - GBO", "children": []}, {"id": 483, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBD", "unique_id": "483"}, "text": "UNITED KINGDOM - BRITISH OVERSEAS TERRITORIES CITIZEN - GBD", "children": []}, {"id": 484, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GBS", "unique_id": "484"}, "text": "UNITED KINGDOM - BRITISH SUBJECT - GBS", "children": []}, {"id": 485, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "USA", "unique_id": "485"}, "text": "UNITED STATES - USA", "children": []}, {"id": 486, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "URY", "unique_id": "486"}, "text": "URUGUAY - URY", "children": []}, {"id": 487, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UZB", "unique_id": "487"}, "text": "UZBEKISTAN - UZB", "children": []}, {"id": 488, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VUT", "unique_id": "488"}, "text": "VANUATU - VUT", "children": []}, {"id": 489, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VAT", "unique_id": "489"}, "text": "VATICAN CITY STATE (HOLY SEE) - VAT", "children": []}, {"id": 490, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VEN", "unique_id": "490"}, "text": "VENEZUELA - VEN", "children": []}, {"id": 491, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VNM", "unique_id": "491"}, "text": "VIET NAM - VNM", "children": []}, {"id": 492, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VGB", "unique_id": "492"}, "text": "VIRGIN ISLANDS (BRITISH) - VGB", "children": []}, {"id": 493, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "YEM", "unique_id": "493"}, "text": "YEMEN, REPUBLIC OF - YEM", "children": []}, {"id": 494, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "YUG", "unique_id": "494"}, "text": "YUGOSLAVIA - YUG", "children": []}, {"id": 495, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZAR", "unique_id": "495"}, "text": "ZAIRE - ZAR", "children": []}, {"id": 496, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZMB", "unique_id": "496"}, "text": "ZAMBIA - ZMB", "children": []}, {"id": 497, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZWE", "unique_id": "497"}, "text": "ZIMBABWE - ZWE", "children": []}]}, {"id": 498, "marker": "MA", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a7e0b0_input", "id": "_2a0j0a0a0e0a0a2a7e0a0", "class": "wc-label", "unique_id": "498"}, "text": "Date of issue", "children": []}, {"id": 499, "marker": "MF", "tagName": "div", "attributes": {"id": "_2a0j0a0a0e0a0a2a7e0b0", "class": "wc-datefield wc_datefield_partial wc-input-wrapper ELP-F0730", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "false", "unique_id": "499"}, "text": "", "children": [{"id": 500, "marker": "MF", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a7e0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a7e0b0", "value": "", "autocomplete": "off", "style": "", "unique_id": "500"}, "text": "", "children": []}, {"id": 501, "marker": "MF", "tagName": "button", "attributes": {"aria-hidden": "true", "class": "wc_wdf_cal wc-invite", "tabindex": "-1", "type": "button", "value": "_2a0j0a0a0e0a0a2a7e0b0_input", "unique_id": "501"}, "text": "", "children": []}]}, {"id": 502, "marker": "MK", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a7f0b0_input", "id": "_2a0j0a0a0e0a0a2a7f0a0", "class": "wc-label", "unique_id": "502"}, "text": "Date of expiry", "children": []}, {"id": 503, "marker": "MS", "tagName": "div", "attributes": {"id": "_2a0j0a0a0e0a0a2a7f0b0", "class": "wc-datefield wc_datefield_partial wc-input-wrapper ELP-F0740", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "false", "unique_id": "503"}, "text": "", "children": [{"id": 504, "marker": "MS", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a7f0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a7f0b0", "value": "", "autocomplete": "off", "style": "", "unique_id": "504"}, "text": "", "children": []}, {"id": 505, "marker": "MS", "tagName": "button", "attributes": {"aria-hidden": "true", "class": "wc_wdf_cal wc-invite", "tabindex": "-1", "type": "button", "value": "_2a0j0a0a0e0a0a2a7f0b0_input", "unique_id": "505"}, "text": "", "children": []}]}, {"id": 506, "marker": "P", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a7h0b0_input", "id": "_2a0j0a0a0e0a0a2a7h0a0", "class": "wc-label", "unique_id": "506"}, "text": "Place of issue / issuing authority", "children": []}, {"id": 507, "marker": "PA", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a7h0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a7h0b0", "value": "", "size": "50", "maxlength": "60", "style": "", "unique_id": "507"}, "text": "", "children": []}, {"id": 508, "marker": "PF", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "508"}, "text": "Yes", "children": [{"id": 509, "marker": "PF", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a9c1b0a", "value": "1", "id": "d1966273077e295", "style": "", "unique_id": "509"}, "text": "", "children": []}]}, {"id": 510, "marker": "PK", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "510"}, "text": "No", "children": [{"id": 511, "marker": "PK", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a9c1b0a", "value": "2", "id": "d1966273077e297", "style": "", "unique_id": "511"}, "text": "", "children": []}]}, {"id": 512, "marker": "PS", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a9c1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on National identity card", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h1810.aspx", "target": "help_elp_h1810", "rel": "noopener noreferrer", "unique_id": "512"}, "text": "\u200b", "children": []}, {"id": 513, "marker": "SA", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "513"}, "text": "Yes", "children": [{"id": 514, "marker": "SA", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a10d1b0", "value": "1", "id": "d1966273077e429", "style": "", "unique_id": "514"}, "text": "", "children": []}]}, {"id": 515, "marker": "SF", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "515"}, "text": "No", "children": [{"id": 516, "marker": "SF", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a10d1b0", "value": "2", "id": "d1966273077e431", "style": "", "unique_id": "516"}, "text": "", "children": []}]}, {"id": 517, "marker": "SK", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a11b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Place of birth section", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0055.aspx", "target": "help_elp_h0055", "rel": "noopener noreferrer", "unique_id": "517"}, "text": "\u200b", "children": []}, {"id": 518, "marker": "SS", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a11c0b0_input", "id": "_2a0j0a0a0e0a0a2a11c0a0", "class": "wc-label", "unique_id": "518"}, "text": "Town / City", "children": []}, {"id": 519, "marker": "SW", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a11c0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a11c0b0", "value": "", "size": "50", "maxlength": "50", "style": "", "unique_id": "519"}, "text": "", "children": []}, {"id": 520, "marker": "WA", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a11d0b0_input", "id": "_2a0j0a0a0e0a0a2a11d0a0", "class": "wc-label", "unique_id": "520"}, "text": "State / Province", "children": []}, {"id": 521, "marker": "WF", "tagName": "input", "attributes": {"id": "_2a0j0a0a0e0a0a2a11d0b0_input", "type": "text", "name": "_2a0j0a0a0e0a0a2a11d0b0", "value": "", "size": "50", "maxlength": "50", "style": "", "unique_id": "521"}, "text": "", "children": []}, {"id": 522, "marker": "WK", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a11e0b0a_input", "id": "_2a0j0a0a0e0a0a2a11e0a0", "class": "wc-label", "unique_id": "522"}, "text": "Country of birth", "children": []}, {"id": 523, "marker": "WS", "tagName": "select", "attributes": {"id": "_2a0j0a0a0e0a0a2a11e0b0a_input", "name": "_2a0j0a0a0e0a0a2a11e0b0a", "unique_id": "523", "options": [{"optionIndex": 0, "text": ""}, {"optionIndex": 1, "text": "AFGHANISTAN"}, {"optionIndex": 2, "text": "ALBANIA"}, {"optionIndex": 3, "text": "ALGERIA"}, {"optionIndex": 4, "text": "AMERICAN SAMOA"}, {"optionIndex": 5, "text": "ANDORRA"}, {"optionIndex": 6, "text": "ANGOLA"}, {"optionIndex": 7, "text": "ANGUILLA"}, {"optionIndex": 8, "text": "ANTIGUA AND BARBUDA"}, {"optionIndex": 9, "text": "ARGENTINA"}, {"optionIndex": 10, "text": "ARMENIA"}, {"optionIndex": 11, "text": "ARUBA"}, {"optionIndex": 12, "text": "AUSTRALIA"}, {"optionIndex": 13, "text": "AUSTRIA"}, {"optionIndex": 14, "text": "AZERBAIJAN"}, {"optionIndex": 15, "text": "BAHAMAS"}, {"optionIndex": 16, "text": "BAHRAIN"}, {"optionIndex": 17, "text": "BANGLADESH"}, {"optionIndex": 18, "text": "BARBADOS"}, {"optionIndex": 19, "text": "BELARUS"}, {"optionIndex": 20, "text": "BELGIUM"}, {"optionIndex": 21, "text": "BELIZE"}, {"optionIndex": 22, "text": "BENIN"}, {"optionIndex": 23, "text": "BERMUDA"}, {"optionIndex": 24, "text": "BHUTAN"}, {"optionIndex": 25, "text": "BOLIVIA"}, {"optionIndex": 26, "text": "BONAIRE, SINT EUSTATIUS AND SABA"}, {"optionIndex": 27, "text": "BOSNIA & HERZEGOVINA"}, {"optionIndex": 28, "text": "BOTSWANA"}, {"optionIndex": 29, "text": "BOUVET ISLAND"}, {"optionIndex": 30, "text": "BRAZIL"}, {"optionIndex": 31, "text": "BRIT DEPEND TERR CIT"}, {"optionIndex": 32, "text": "BRIT INDIAN OCN TERR"}, {"optionIndex": 33, "text": "BRITISH WEST INDIES"}, {"optionIndex": 34, "text": "BRUNEI DARUSSALAM"}, {"optionIndex": 35, "text": "BULGARIA"}, {"optionIndex": 36, "text": "BURKINA FASO"}, {"optionIndex": 37, "text": "BURUNDI"}, {"optionIndex": 38, "text": "CABO VERDE"}, {"optionIndex": 39, "text": "CAMBODIA"}, {"optionIndex": 40, "text": "CAMEROON"}, {"optionIndex": 41, "text": "CANADA"}, {"optionIndex": 42, "text": "CAPE VERDE"}, {"optionIndex": 43, "text": "CAYMAN ISLANDS"}, {"optionIndex": 44, "text": "CENTRAL AFRICAN REP"}, {"optionIndex": 45, "text": "CHAD"}, {"optionIndex": 46, "text": "CHANNEL ISLANDS"}, {"optionIndex": 47, "text": "CHILE"}, {"optionIndex": 48, "text": "CHINA"}, {"optionIndex": 49, "text": "CHRISTMAS ISLAND"}, {"optionIndex": 50, "text": "COCOS (KEELING) ISL"}, {"optionIndex": 51, "text": "COLOMBIA"}, {"optionIndex": 52, "text": "COMOROS"}, {"optionIndex": 53, "text": "CONGO"}, {"optionIndex": 54, "text": "CONGO, DEMOCRATIC REPUBLIC OF THE"}, {"optionIndex": 55, "text": "COOK ISLANDS"}, {"optionIndex": 56, "text": "COSTA RICA"}, {"optionIndex": 57, "text": "COTE D'IVOIRE"}, {"optionIndex": 58, "text": "CROATIA"}, {"optionIndex": 59, "text": "CUBA"}, {"optionIndex": 60, "text": "CURACAO"}, {"optionIndex": 61, "text": "CYPRUS"}, {"optionIndex": 62, "text": "CZECH REPUBLIC"}, {"optionIndex": 63, "text": "CZECHIA (CZECH REP)"}, {"optionIndex": 64, "text": "CZECHOSLOVAKIA"}, {"optionIndex": 65, "text": "DENMARK"}, {"optionIndex": 66, "text": "DJIBOUTI"}, {"optionIndex": 67, "text": "DOMINICA"}, {"optionIndex": 68, "text": "DOMINICAN REPUBLIC"}, {"optionIndex": 69, "text": "ECUADOR"}, {"optionIndex": 70, "text": "EGYPT"}, {"optionIndex": 71, "text": "EL SALVADOR"}, {"optionIndex": 72, "text": "ENGLAND"}, {"optionIndex": 73, "text": "EQUATORIAL GUINEA"}, {"optionIndex": 74, "text": "ERITREA"}, {"optionIndex": 75, "text": "ESTONIA"}, {"optionIndex": 76, "text": "ESWATINI"}, {"optionIndex": 77, "text": "ETHIOPIA"}, {"optionIndex": 78, "text": "FALKLAND ISLANDS"}, {"optionIndex": 79, "text": "FAROE ISLANDS"}, {"optionIndex": 80, "text": "FIJI"}, {"optionIndex": 81, "text": "FINLAND"}, {"optionIndex": 82, "text": "FRANCE"}, {"optionIndex": 83, "text": "FRENCH GUIANA"}, {"optionIndex": 84, "text": "FRENCH POLYNESIA"}, {"optionIndex": 85, "text": "FYR MACEDONIA"}, {"optionIndex": 86, "text": "GABON"}, {"optionIndex": 87, "text": "GAMBIA"}, {"optionIndex": 88, "text": "GEORGIA"}, {"optionIndex": 89, "text": "GEORGIA/SANDWICH ISL"}, {"optionIndex": 90, "text": "GERMAN DEM REPUBLIC"}, {"optionIndex": 91, "text": "GERMANY"}, {"optionIndex": 92, "text": "GHANA"}, {"optionIndex": 93, "text": "GIBRALTAR"}, {"optionIndex": 94, "text": "GREECE"}, {"optionIndex": 95, "text": "GREENLAND"}, {"optionIndex": 96, "text": "GRENADA"}, {"optionIndex": 97, "text": "GUADELOUPE"}, {"optionIndex": 98, "text": "GUAM"}, {"optionIndex": 99, "text": "GUATEMALA"}, {"optionIndex": 100, "text": "GUERNSEY"}, {"optionIndex": 101, "text": "GUINEA"}, {"optionIndex": 102, "text": "GUINEA-BISSAU"}, {"optionIndex": 103, "text": "GUYANA"}, {"optionIndex": 104, "text": "HAITI"}, {"optionIndex": 105, "text": "HEARD & MCDONALD ISL"}, {"optionIndex": 106, "text": "HONDURAS"}, {"optionIndex": 107, "text": "HONG KONG SAR"}, {"optionIndex": 108, "text": "HUNGARY"}, {"optionIndex": 109, "text": "ICELAND"}, {"optionIndex": 110, "text": "INDIA"}, {"optionIndex": 111, "text": "INDONESIA"}, {"optionIndex": 112, "text": "IRAN"}, {"optionIndex": 113, "text": "IRAQ"}, {"optionIndex": 114, "text": "IRELAND"}, {"optionIndex": 115, "text": "ISLE OF MAN"}, {"optionIndex": 116, "text": "ISRAEL"}, {"optionIndex": 117, "text": "ITALY"}, {"optionIndex": 118, "text": "JAMAICA"}, {"optionIndex": 119, "text": "JAPAN"}, {"optionIndex": 120, "text": "JERSEY"}, {"optionIndex": 121, "text": "JORDAN"}, {"optionIndex": 122, "text": "KAZAKHSTAN"}, {"optionIndex": 123, "text": "KENYA"}, {"optionIndex": 124, "text": "KIRIBATI"}, {"optionIndex": 125, "text": "KOREA (SO STATED)"}, {"optionIndex": 126, "text": "KOREA, NORTH"}, {"optionIndex": 127, "text": "KOREA, SOUTH"}, {"optionIndex": 128, "text": "KOSOVO"}, {"optionIndex": 129, "text": "KUWAIT"}, {"optionIndex": 130, "text": "KYRGYZSTAN"}, {"optionIndex": 131, "text": "LAO PEOPLES DEM REP"}, {"optionIndex": 132, "text": "LATVIA"}, {"optionIndex": 133, "text": "LEBANON"}, {"optionIndex": 134, "text": "LESOTHO"}, {"optionIndex": 135, "text": "LIBERIA"}, {"optionIndex": 136, "text": "LIBYA"}, {"optionIndex": 137, "text": "LIBYAN ARAB JAMAHIRI"}, {"optionIndex": 138, "text": "LIECHTENSTEIN"}, {"optionIndex": 139, "text": "LITHUANIA"}, {"optionIndex": 140, "text": "LUXEMBOURG"}, {"optionIndex": 141, "text": "MACAU SPCL ADMIN RGN"}, {"optionIndex": 142, "text": "MADAGASCAR"}, {"optionIndex": 143, "text": "MALAWI"}, {"optionIndex": 144, "text": "MALAYSIA"}, {"optionIndex": 145, "text": "MALDIVES"}, {"optionIndex": 146, "text": "MALI"}, {"optionIndex": 147, "text": "MALTA"}, {"optionIndex": 148, "text": "MARSHALL ISLANDS"}, {"optionIndex": 149, "text": "MARTINIQUE"}, {"optionIndex": 150, "text": "MAURITANIA"}, {"optionIndex": 151, "text": "MAURITIUS"}, {"optionIndex": 152, "text": "MAYOTTE"}, {"optionIndex": 153, "text": "MEXICO"}, {"optionIndex": 154, "text": "MICRONESIA"}, {"optionIndex": 155, "text": "MOLDOVA"}, {"optionIndex": 156, "text": "MONACO"}, {"optionIndex": 157, "text": "MONGOLIA"}, {"optionIndex": 158, "text": "MONTENEGRO"}, {"optionIndex": 159, "text": "MONTSERRAT"}, {"optionIndex": 160, "text": "MOROCCO"}, {"optionIndex": 161, "text": "MOZAMBIQUE"}, {"optionIndex": 162, "text": "MYANMAR"}, {"optionIndex": 163, "text": "NAMIBIA"}, {"optionIndex": 164, "text": "NAURU"}, {"optionIndex": 165, "text": "NEPAL"}, {"optionIndex": 166, "text": "NETHERLANDS"}, {"optionIndex": 167, "text": "NETHERLANDS ANTILLES"}, {"optionIndex": 168, "text": "NEW CALEDONIA"}, {"optionIndex": 169, "text": "NEW GUINEA"}, {"optionIndex": 170, "text": "NEW HEBRIDES"}, {"optionIndex": 171, "text": "NEW ZEALAND"}, {"optionIndex": 172, "text": "NICARAGUA"}, {"optionIndex": 173, "text": "NIGER"}, {"optionIndex": 174, "text": "NIGERIA"}, {"optionIndex": 175, "text": "NIUE"}, {"optionIndex": 176, "text": "NORFOLK ISLAND"}, {"optionIndex": 177, "text": "NORTH MACEDONIA"}, {"optionIndex": 178, "text": "NORTHERN IRELAND"}, {"optionIndex": 179, "text": "NORTHERN MARIANA ISL"}, {"optionIndex": 180, "text": "NORWAY"}, {"optionIndex": 181, "text": "OMAN"}, {"optionIndex": 182, "text": "PAKISTAN"}, {"optionIndex": 183, "text": "PALAU"}, {"optionIndex": 184, "text": "PALESTINIAN AUTHORTY"}, {"optionIndex": 185, "text": "PANAMA"}, {"optionIndex": 186, "text": "PAPUA NEW GUINEA"}, {"optionIndex": 187, "text": "PARAGUAY"}, {"optionIndex": 188, "text": "PERU"}, {"optionIndex": 189, "text": "PHILIPPINES"}, {"optionIndex": 190, "text": "PITCAIRN"}, {"optionIndex": 191, "text": "PLEASANT ISLAND"}, {"optionIndex": 192, "text": "POLAND"}, {"optionIndex": 193, "text": "PORTUGAL"}, {"optionIndex": 194, "text": "PUERTO RICO"}, {"optionIndex": 195, "text": "QATAR"}, {"optionIndex": 196, "text": "REUNION"}, {"optionIndex": 197, "text": "ROMANIA"}, {"optionIndex": 198, "text": "ROMANIA PRE 1/2/2002"}, {"optionIndex": 199, "text": "RUSSIAN FEDERATION"}, {"optionIndex": 200, "text": "RWANDA"}, {"optionIndex": 201, "text": "SAINT BARTHELEMY"}, {"optionIndex": 202, "text": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA"}, {"optionIndex": 203, "text": "SAINT LUCIA"}, {"optionIndex": 204, "text": "SAINT MARTIN"}, {"optionIndex": 205, "text": "SAMOA"}, {"optionIndex": 206, "text": "SAN MARINO"}, {"optionIndex": 207, "text": "SAO TOME & PRINCIPE"}, {"optionIndex": 208, "text": "SAUDI ARABIA"}, {"optionIndex": 209, "text": "SCOTLAND"}, {"optionIndex": 210, "text": "SENEGAL"}, {"optionIndex": 211, "text": "SERBIA"}, {"optionIndex": 212, "text": "SERBIA AND MONTENEGRO"}, {"optionIndex": 213, "text": "SEYCHELLES"}, {"optionIndex": 214, "text": "SIERRA LEONE"}, {"optionIndex": 215, "text": "SINGAPORE"}, {"optionIndex": 216, "text": "SINT MAARTEN (DUTCH PART)"}, {"optionIndex": 217, "text": "SLOVAK REPUBLIC"}, {"optionIndex": 218, "text": "SLOVENIA"}, {"optionIndex": 219, "text": "SOLOMON ISLANDS"}, {"optionIndex": 220, "text": "SOMALIA"}, {"optionIndex": 221, "text": "SOUTH AFRICA"}, {"optionIndex": 222, "text": "SOUTH SUDAN"}, {"optionIndex": 223, "text": "SPAIN"}, {"optionIndex": 224, "text": "SRI LANKA"}, {"optionIndex": 225, "text": "ST HELENA"}, {"optionIndex": 226, "text": "ST KITTS AND NEVIS"}, {"optionIndex": 227, "text": "ST PIERRE & MIQUELON"}, {"optionIndex": 228, "text": "ST VINCENT/GRENADINE"}, {"optionIndex": 229, "text": "SUDAN"}, {"optionIndex": 230, "text": "SURINAME"}, {"optionIndex": 231, "text": "SVALBARD & JAN MAYEN"}, {"optionIndex": 232, "text": "SWAZILAND"}, {"optionIndex": 233, "text": "SWEDEN"}, {"optionIndex": 234, "text": "SWITZERLAND"}, {"optionIndex": 235, "text": "SYRIA"}, {"optionIndex": 236, "text": "TAHITI"}, {"optionIndex": 237, "text": "TAIWAN"}, {"optionIndex": 238, "text": "TAJIKISTAN"}, {"optionIndex": 239, "text": "TANZANIA"}, {"optionIndex": 240, "text": "THAILAND"}, {"optionIndex": 241, "text": "TIBET (SO STATED)"}, {"optionIndex": 242, "text": "TIMOR, EAST"}, {"optionIndex": 243, "text": "TIMOR-LESTE"}, {"optionIndex": 244, "text": "TOGO"}, {"optionIndex": 245, "text": "TOKELAU"}, {"optionIndex": 246, "text": "TONGA"}, {"optionIndex": 247, "text": "TRINIDAD AND TOBAGO"}, {"optionIndex": 248, "text": "TUNISIA"}, {"optionIndex": 249, "text": "TURKIYE"}, {"optionIndex": 250, "text": "TURKMENISTAN"}, {"optionIndex": 251, "text": "TURKS AND CAICOS ISL"}, {"optionIndex": 252, "text": "TUVALU"}, {"optionIndex": 253, "text": "U.S. MINOR ISLANDS"}, {"optionIndex": 254, "text": "U.S.S.R."}, {"optionIndex": 255, "text": "UGANDA"}, {"optionIndex": 256, "text": "UKRAINE"}, {"optionIndex": 257, "text": "UNITED ARAB EMIRATES"}, {"optionIndex": 258, "text": "UNITED KINGDOM"}, {"optionIndex": 259, "text": "UNITED STATES"}, {"optionIndex": 260, "text": "URUGUAY"}, {"optionIndex": 261, "text": "UZBEKISTAN"}, {"optionIndex": 262, "text": "VANUATU"}, {"optionIndex": 263, "text": "VATICAN CITY STATE"}, {"optionIndex": 264, "text": "VENEZUELA"}, {"optionIndex": 265, "text": "VIETNAM"}, {"optionIndex": 266, "text": "VIRGIN ISLANDS (U.S.)"}, {"optionIndex": 267, "text": "VIRGIN ISLNDS (BRIT)"}, {"optionIndex": 268, "text": "WALES"}, {"optionIndex": 269, "text": "WALLIS & FUTUNA ISL"}, {"optionIndex": 270, "text": "YEMEN"}, {"optionIndex": 271, "text": "YUGOSLAVIA"}, {"optionIndex": 272, "text": "ZAIRE"}, {"optionIndex": 273, "text": "ZAMBIA"}, {"optionIndex": 274, "text": "ZIMBABWE"}]}, "text": "AFGHANISTANALBANIAALGERIAAMERICAN SAMOAANDORRAANGOLAANGUILLAANTIGUA AND BARBUDAARGENTINAARMENIAARUBAAUSTRALIAAUSTRIAAZERBAIJANBAHAMASBAHRAINBANGLADESHBARBADOSBELARUSBELGIUMBELIZEBENINBERMUDABHUTANBOLIVIABONAIRE, SINT EUSTATIUS AND SABABOSNIA & HERZEGOVINABOTSWANABOUVET ISLANDBRAZILBRIT DEPEND TERR CITBRIT INDIAN OCN TERRBRITISH WEST INDIESBRUNEI DARUSSALAMBULGARIABURKINA FASOBURUNDICABO VERDECAMBODIACAMEROONCANADACAPE VERDECAYMAN ISLANDSCENTRAL AFRICAN REPCHADCHANNEL ISLANDSCHILECHINACHRISTMAS ISLANDCOCOS (KEELING) ISLCOLOMBIACOMOROSCONGOCONGO, DEMOCRATIC REPUBLIC OF THECOOK ISLANDSCOSTA RICACOTE D'IVOIRECROATIACUBACURACAOCYPRUSCZECH REPUBLICCZECHIA (CZECH REP)CZECHOSLOVAKIADENMARKDJIBOUTIDOMINICADOMINICAN REPUBLICECUADOREGYPTEL SALVADORENGLANDEQUATORIAL GUINEAERITREAESTONIAESWATINIETHIOPIAFALKLAND ISLANDSFAROE ISLANDSFIJIFINLANDFRANCEFRENCH GUIANAFRENCH POLYNESIAFYR MACEDONIAGABONGAMBIAGEORGIAGEORGIA/SANDWICH ISLGERMAN DEM REPUBLICGERMANYGHANAGIBRALTARGREECEGREENLANDGRENADAGUADELOUPEGUAMGUATEMALAGUERNSEYGUINEAGUINEA-BISSAUGUYANAHAITIHEARD & MCDONALD ISLHONDURASHONG KONG SARHUNGARYICELANDINDIAINDONESIAIRANIRAQIRELANDISLE OF MANISRAELITALYJAMAICAJAPANJERSEYJORDANKAZAKHSTANKENYAKIRIBATIKOREA (SO STATED)KOREA, NORTHKOREA, SOUTHKOSOVOKUWAITKYRGYZSTANLAO PEOPLES DEM REPLATVIALEBANONLESOTHOLIBERIALIBYALIBYAN ARAB JAMAHIRILIECHTENSTEINLITHUANIALUXEMBOURGMACAU SPCL ADMIN RGNMADAGASCARMALAWIMALAYSIAMALDIVESMALIMALTAMARSHALL ISLANDSMARTINIQUEMAURITANIAMAURITIUSMAYOTTEMEXICOMICRONESIAMOLDOVAMONACOMONGOLIAMONTENEGROMONTSERRATMOROCCOMOZAMBIQUEMYANMARNAMIBIANAURUNEPALNETHERLANDSNETHERLANDS ANTILLESNEW CALEDONIANEW GUINEANEW HEBRIDESNEW ZEALANDNICARAGUANIGERNIGERIANIUENORFOLK ISLANDNORTH MACEDONIANORTHERN IRELANDNORTHERN MARIANA ISLNORWAYOMANPAKISTANPALAUPALESTINIAN AUTHORTYPANAMAPAPUA NEW GUINEAPARAGUAYPERUPHILIPPINESPITCAIRNPLEASANT ISLANDPOLANDPORTUGALPUERTO RICOQATARREUNIONROMANIAROMANIA PRE 1/2/2002RUSSIAN FEDERATIONRWANDASAINT BARTHELEMYSAINT HELENA, ASCENSION AND TRISTAN DA CUNHASAINT LUCIASAINT MARTINSAMOASAN MARINOSAO TOME & PRINCIPESAUDI ARABIASCOTLANDSENEGALSERBIASERBIA AND MONTENEGROSEYCHELLESSIERRA LEONESINGAPORESINT MAARTEN (DUTCH PART)SLOVAK REPUBLICSLOVENIASOLOMON ISLANDSSOMALIASOUTH AFRICASOUTH SUDANSPAINSRI LANKAST HELENAST KITTS AND NEVISST PIERRE & MIQUELONST VINCENT/GRENADINESUDANSURINAMESVALBARD & JAN MAYENSWAZILANDSWEDENSWITZERLANDSYRIATAHITITAIWANTAJIKISTANTANZANIATHAILANDTIBET (SO STATED)TIMOR, EASTTIMOR-LESTETOGOTOKELAUTONGATRINIDAD AND TOBAGOTUNISIATURKIYETURKMENISTANTURKS AND CAICOS ISLTUVALUU.S. MINOR ISLANDSU.S.S.R.UGANDAUKRAINEUNITED ARAB EMIRATESUNITED KINGDOMUNITED STATESURUGUAYUZBEKISTANVANUATUVATICAN CITY STATEVENEZUELAVIETNAMVIRGIN ISLANDS (U.S.)VIRGIN ISLNDS (BRIT)WALESWALLIS & FUTUNA ISLYEMENYUGOSLAVIAZAIREZAMBIAZIMBABWE", "children": [{"id": 524, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "", "data-wc-null": "1", "selected": "selected", "unique_id": "524"}, "text": "", "children": []}, {"id": 525, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AFGH", "unique_id": "525"}, "text": "AFGHANISTAN", "children": []}, {"id": 526, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ALBA", "unique_id": "526"}, "text": "ALBANIA", "children": []}, {"id": 527, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ALGE", "unique_id": "527"}, "text": "ALGERIA", "children": []}, {"id": 528, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ASAM", "unique_id": "528"}, "text": "AMERICAN SAMOA", "children": []}, {"id": 529, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ANDO", "unique_id": "529"}, "text": "ANDORRA", "children": []}, {"id": 530, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ANGA", "unique_id": "530"}, "text": "ANGOLA", "children": []}, {"id": 531, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ANGU", "unique_id": "531"}, "text": "ANGUILLA", "children": []}, {"id": 532, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ANBA", "unique_id": "532"}, "text": "ANTIGUA AND BARBUDA", "children": []}, {"id": 533, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARGE", "unique_id": "533"}, "text": "ARGENTINA", "children": []}, {"id": 534, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARME", "unique_id": "534"}, "text": "ARMENIA", "children": []}, {"id": 535, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ARUB", "unique_id": "535"}, "text": "ARUBA", "children": []}, {"id": 536, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "A", "unique_id": "536"}, "text": "AUSTRALIA", "children": []}, {"id": 537, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AUST", "unique_id": "537"}, "text": "AUSTRIA", "children": []}, {"id": 538, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "AZER", "unique_id": "538"}, "text": "AZERBAIJAN", "children": []}, {"id": 539, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BHMS", "unique_id": "539"}, "text": "BAHAMAS", "children": []}, {"id": 540, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BAHR", "unique_id": "540"}, "text": "BAHRAIN", "children": []}, {"id": 541, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BDES", "unique_id": "541"}, "text": "BANGLADESH", "children": []}, {"id": 542, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BARS", "unique_id": "542"}, "text": "BARBADOS", "children": []}, {"id": 543, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BYEL", "unique_id": "543"}, "text": "BELARUS", "children": []}, {"id": 544, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BELM", "unique_id": "544"}, "text": "BELGIUM", "children": []}, {"id": 545, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BELZ", "unique_id": "545"}, "text": "BELIZE", "children": []}, {"id": 546, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BENI", "unique_id": "546"}, "text": "BENIN", "children": []}, {"id": 547, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BERM", "unique_id": "547"}, "text": "BERMUDA", "children": []}, {"id": 548, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BHUT", "unique_id": "548"}, "text": "BHUTAN", "children": []}, {"id": 549, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BOLI", "unique_id": "549"}, "text": "BOLIVIA", "children": []}, {"id": 550, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BSES", "unique_id": "550"}, "text": "BONAIRE, SINT EUSTATIUS AND SABA", "children": []}, {"id": 551, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BOHE", "unique_id": "551"}, "text": "BOSNIA & HERZEGOVINA", "children": []}, {"id": 552, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BOTS", "unique_id": "552"}, "text": "BOTSWANA", "children": []}, {"id": 553, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BVTI", "unique_id": "553"}, "text": "BOUVET ISLAND", "children": []}, {"id": 554, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRAZ", "unique_id": "554"}, "text": "BRAZIL", "children": []}, {"id": 555, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BDTC", "unique_id": "555"}, "text": "BRIT DEPEND TERR CIT", "children": []}, {"id": 556, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BIOT", "unique_id": "556"}, "text": "BRIT INDIAN OCN TERR", "children": []}, {"id": 557, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BWIN", "unique_id": "557"}, "text": "BRITISH WEST INDIES", "children": []}, {"id": 558, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BRUI", "unique_id": "558"}, "text": "BRUNEI DARUSSALAM", "children": []}, {"id": 559, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BULG", "unique_id": "559"}, "text": "BULGARIA", "children": []}, {"id": 560, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UVOL", "unique_id": "560"}, "text": "BURKINA FASO", "children": []}, {"id": 561, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "BURU", "unique_id": "561"}, "text": "BURUNDI", "children": []}, {"id": 562, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CABV", "unique_id": "562"}, "text": "CABO VERDE", "children": []}, {"id": 563, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CAMB", "unique_id": "563"}, "text": "CAMBODIA", "children": []}, {"id": 564, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CREP", "unique_id": "564"}, "text": "CAMEROON", "children": []}, {"id": 565, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CANA", "unique_id": "565"}, "text": "CANADA", "children": []}, {"id": 566, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CVER", "unique_id": "566"}, "text": "CAPE VERDE", "children": []}, {"id": 567, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CAIS", "unique_id": "567"}, "text": "CAYMAN ISLANDS", "children": []}, {"id": 568, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CARE", "unique_id": "568"}, "text": "CENTRAL AFRICAN REP", "children": []}, {"id": 569, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHAD", "unique_id": "569"}, "text": "CHAD", "children": []}, {"id": 570, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CLIS", "unique_id": "570"}, "text": "CHANNEL ISLANDS", "children": []}, {"id": 571, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CHIL", "unique_id": "571"}, "text": "CHILE", "children": []}, {"id": 572, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRCH", "unique_id": "572"}, "text": "CHINA", "children": []}, {"id": 573, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CSIS", "unique_id": "573"}, "text": "CHRISTMAS ISLAND", "children": []}, {"id": 574, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COCO", "unique_id": "574"}, "text": "COCOS (KEELING) ISL", "children": []}, {"id": 575, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COLA", "unique_id": "575"}, "text": "COLOMBIA", "children": []}, {"id": 576, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COMO", "unique_id": "576"}, "text": "COMOROS", "children": []}, {"id": 577, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CONG", "unique_id": "577"}, "text": "CONGO", "children": []}, {"id": 578, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DRCO", "unique_id": "578"}, "text": "CONGO, DEMOCRATIC REPUBLIC OF THE", "children": []}, {"id": 579, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "COOI", "unique_id": "579"}, "text": "COOK ISLANDS", "children": []}, {"id": 580, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CRIC", "unique_id": "580"}, "text": "COSTA RICA", "children": []}, {"id": 581, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ICOA", "unique_id": "581"}, "text": "COTE D'IVOIRE", "children": []}, {"id": 582, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CROA", "unique_id": "582"}, "text": "CROATIA", "children": []}, {"id": 583, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CUBA", "unique_id": "583"}, "text": "CUBA", "children": []}, {"id": 584, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CURA", "unique_id": "584"}, "text": "CURACAO", "children": []}, {"id": 585, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CYPR", "unique_id": "585"}, "text": "CYPRUS", "children": []}, {"id": 586, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CZER", "unique_id": "586"}, "text": "CZECH REPUBLIC", "children": []}, {"id": 587, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CZEH", "unique_id": "587"}, "text": "CZECHIA (CZECH REP)", "children": []}, {"id": 588, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "CZEC", "unique_id": "588"}, "text": "CZECHOSLOVAKIA", "children": []}, {"id": 589, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DENM", "unique_id": "589"}, "text": "DENMARK", "children": []}, {"id": 590, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JIBU", "unique_id": "590"}, "text": "DJIBOUTI", "children": []}, {"id": 591, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DOMI", "unique_id": "591"}, "text": "DOMINICA", "children": []}, {"id": 592, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "DREP", "unique_id": "592"}, "text": "DOMINICAN REPUBLIC", "children": []}, {"id": 593, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ECUA", "unique_id": "593"}, "text": "ECUADOR", "children": []}, {"id": 594, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "EGYP", "unique_id": "594"}, "text": "EGYPT", "children": []}, {"id": 595, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ESAL", "unique_id": "595"}, "text": "EL SALVADOR", "children": []}, {"id": 596, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ENGL", "unique_id": "596"}, "text": "ENGLAND", "children": []}, {"id": 597, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "EQGN", "unique_id": "597"}, "text": "EQUATORIAL GUINEA", "children": []}, {"id": 598, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ERIT", "unique_id": "598"}, "text": "ERITREA", "children": []}, {"id": 599, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ESTO", "unique_id": "599"}, "text": "ESTONIA", "children": []}, {"id": 600, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ESWA", "unique_id": "600"}, "text": "ESWATINI", "children": []}, {"id": 601, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ETHI", "unique_id": "601"}, "text": "ETHIOPIA", "children": []}, {"id": 602, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FALI", "unique_id": "602"}, "text": "FALKLAND ISLANDS", "children": []}, {"id": 603, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FAIS", "unique_id": "603"}, "text": "FAROE ISLANDS", "children": []}, {"id": 604, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FIJI", "unique_id": "604"}, "text": "FIJI", "children": []}, {"id": 605, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FINL", "unique_id": "605"}, "text": "FINLAND", "children": []}, {"id": 606, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FRAE", "unique_id": "606"}, "text": "FRANCE", "children": []}, {"id": 607, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUYE", "unique_id": "607"}, "text": "FRENCH GUIANA", "children": []}, {"id": 608, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FPOL", "unique_id": "608"}, "text": "FRENCH POLYNESIA", "children": []}, {"id": 609, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MKDA", "unique_id": "609"}, "text": "FYR MACEDONIA", "children": []}, {"id": 610, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GABO", "unique_id": "610"}, "text": "GABON", "children": []}, {"id": 611, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GAMB", "unique_id": "611"}, "text": "GAMBIA", "children": []}, {"id": 612, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GEOG", "unique_id": "612"}, "text": "GEORGIA", "children": []}, {"id": 613, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SGSI", "unique_id": "613"}, "text": "GEORGIA/SANDWICH ISL", "children": []}, {"id": 614, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GDR", "unique_id": "614"}, "text": "GERMAN DEM REPUBLIC", "children": []}, {"id": 615, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GERM", "unique_id": "615"}, "text": "GERMANY", "children": []}, {"id": 616, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GHAN", "unique_id": "616"}, "text": "GHANA", "children": []}, {"id": 617, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GIBR", "unique_id": "617"}, "text": "GIBRALTAR", "children": []}, {"id": 618, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GREE", "unique_id": "618"}, "text": "GREECE", "children": []}, {"id": 619, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GRED", "unique_id": "619"}, "text": "GREENLAND", "children": []}, {"id": 620, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GREN", "unique_id": "620"}, "text": "GRENADA", "children": []}, {"id": 621, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUAE", "unique_id": "621"}, "text": "GUADELOUPE", "children": []}, {"id": 622, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUAM", "unique_id": "622"}, "text": "GUAM", "children": []}, {"id": 623, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUAT", "unique_id": "623"}, "text": "GUATEMALA", "children": []}, {"id": 624, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUER", "unique_id": "624"}, "text": "GUERNSEY", "children": []}, {"id": 625, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUIN", "unique_id": "625"}, "text": "GUINEA", "children": []}, {"id": 626, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUBS", "unique_id": "626"}, "text": "GUINEA-BISSAU", "children": []}, {"id": 627, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GUYN", "unique_id": "627"}, "text": "GUYANA", "children": []}, {"id": 628, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HAIT", "unique_id": "628"}, "text": "HAITI", "children": []}, {"id": 629, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HMDI", "unique_id": "629"}, "text": "HEARD & MCDONALD ISL", "children": []}, {"id": 630, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HOND", "unique_id": "630"}, "text": "HONDURAS", "children": []}, {"id": 631, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HKON", "unique_id": "631"}, "text": "HONG KONG SAR", "children": []}, {"id": 632, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "HUNG", "unique_id": "632"}, "text": "HUNGARY", "children": []}, {"id": 633, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ICEL", "unique_id": "633"}, "text": "ICELAND", "children": []}, {"id": 634, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "INDI", "unique_id": "634"}, "text": "INDIA", "children": []}, {"id": 635, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "INDO", "unique_id": "635"}, "text": "INDONESIA", "children": []}, {"id": 636, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRAN", "unique_id": "636"}, "text": "IRAN", "children": []}, {"id": 637, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IRAQ", "unique_id": "637"}, "text": "IRAQ", "children": []}, {"id": 638, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IREP", "unique_id": "638"}, "text": "IRELAND", "children": []}, {"id": 639, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "IMAN", "unique_id": "639"}, "text": "ISLE OF MAN", "children": []}, {"id": 640, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ISRA", "unique_id": "640"}, "text": "ISRAEL", "children": []}, {"id": 641, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ITAL", "unique_id": "641"}, "text": "ITALY", "children": []}, {"id": 642, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JAMA", "unique_id": "642"}, "text": "JAMAICA", "children": []}, {"id": 643, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JAPA", "unique_id": "643"}, "text": "JAPAN", "children": []}, {"id": 644, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JERS", "unique_id": "644"}, "text": "JERSEY", "children": []}, {"id": 645, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "JORD", "unique_id": "645"}, "text": "JORDAN", "children": []}, {"id": 646, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KAZA", "unique_id": "646"}, "text": "KAZAKHSTAN", "children": []}, {"id": 647, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KENY", "unique_id": "647"}, "text": "KENYA", "children": []}, {"id": 648, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "GIIS", "unique_id": "648"}, "text": "KIRIBATI", "children": []}, {"id": 649, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KORE", "unique_id": "649"}, "text": "KOREA (SO STATED)", "children": []}, {"id": 650, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NKOR", "unique_id": "650"}, "text": "KOREA, NORTH", "children": []}, {"id": 651, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SKOR", "unique_id": "651"}, "text": "KOREA, SOUTH", "children": []}, {"id": 652, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KOSO", "unique_id": "652"}, "text": "KOSOVO", "children": []}, {"id": 653, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KUWA", "unique_id": "653"}, "text": "KUWAIT", "children": []}, {"id": 654, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "KIRG", "unique_id": "654"}, "text": "KYRGYZSTAN", "children": []}, {"id": 655, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LAOS", "unique_id": "655"}, "text": "LAO PEOPLES DEM REP", "children": []}, {"id": 656, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LATV", "unique_id": "656"}, "text": "LATVIA", "children": []}, {"id": 657, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LEBA", "unique_id": "657"}, "text": "LEBANON", "children": []}, {"id": 658, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LESO", "unique_id": "658"}, "text": "LESOTHO", "children": []}, {"id": 659, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LIBE", "unique_id": "659"}, "text": "LIBERIA", "children": []}, {"id": 660, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LIBA", "unique_id": "660"}, "text": "LIBYA", "children": []}, {"id": 661, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LIBY", "unique_id": "661"}, "text": "LIBYAN ARAB JAMAHIRI", "children": []}, {"id": 662, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LIEC", "unique_id": "662"}, "text": "LIECHTENSTEIN", "children": []}, {"id": 663, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LITH", "unique_id": "663"}, "text": "LITHUANIA", "children": []}, {"id": 664, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "LUXE", "unique_id": "664"}, "text": "LUXEMBOURG", "children": []}, {"id": 665, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MACS", "unique_id": "665"}, "text": "MACAU SPCL ADMIN RGN", "children": []}, {"id": 666, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MADA", "unique_id": "666"}, "text": "MADAGASCAR", "children": []}, {"id": 667, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MALW", "unique_id": "667"}, "text": "MALAWI", "children": []}, {"id": 668, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MALS", "unique_id": "668"}, "text": "MALAYSIA", "children": []}, {"id": 669, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MIS", "unique_id": "669"}, "text": "MALDIVES", "children": []}, {"id": 670, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "M", "unique_id": "670"}, "text": "MALI", "children": []}, {"id": 671, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MALT", "unique_id": "671"}, "text": "MALTA", "children": []}, {"id": 672, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAIS", "unique_id": "672"}, "text": "MARSHALL ISLANDS", "children": []}, {"id": 673, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MART", "unique_id": "673"}, "text": "MARTINIQUE", "children": []}, {"id": 674, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAUA", "unique_id": "674"}, "text": "MAURITANIA", "children": []}, {"id": 675, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAUS", "unique_id": "675"}, "text": "MAURITIUS", "children": []}, {"id": 676, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MAYO", "unique_id": "676"}, "text": "MAYOTTE", "children": []}, {"id": 677, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MEXI", "unique_id": "677"}, "text": "MEXICO", "children": []}, {"id": 678, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MICS", "unique_id": "678"}, "text": "MICRONESIA", "children": []}, {"id": 679, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MOLD", "unique_id": "679"}, "text": "MOLDOVA", "children": []}, {"id": 680, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MONA", "unique_id": "680"}, "text": "MONACO", "children": []}, {"id": 681, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MONG", "unique_id": "681"}, "text": "MONGOLIA", "children": []}, {"id": 682, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MNTE", "unique_id": "682"}, "text": "MONTENEGRO", "children": []}, {"id": 683, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MONT", "unique_id": "683"}, "text": "MONTSERRAT", "children": []}, {"id": 684, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MORO", "unique_id": "684"}, "text": "MOROCCO", "children": []}, {"id": 685, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MOZA", "unique_id": "685"}, "text": "MOZAMBIQUE", "children": []}, {"id": 686, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "MYAN", "unique_id": "686"}, "text": "MYANMAR", "children": []}, {"id": 687, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NAMI", "unique_id": "687"}, "text": "NAMIBIA", "children": []}, {"id": 688, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NAUR", "unique_id": "688"}, "text": "NAURU", "children": []}, {"id": 689, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NEPA", "unique_id": "689"}, "text": "NEPAL", "children": []}, {"id": 690, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NETH", "unique_id": "690"}, "text": "NETHERLANDS", "children": []}, {"id": 691, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NANT", "unique_id": "691"}, "text": "NETHERLANDS ANTILLES", "children": []}, {"id": 692, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NCAL", "unique_id": "692"}, "text": "NEW CALEDONIA", "children": []}, {"id": 693, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NEWG", "unique_id": "693"}, "text": "NEW GUINEA", "children": []}, {"id": 694, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NHEB", "unique_id": "694"}, "text": "NEW HEBRIDES", "children": []}, {"id": 695, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NZEA", "unique_id": "695"}, "text": "NEW ZEALAND", "children": []}, {"id": 696, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NICA", "unique_id": "696"}, "text": "NICARAGUA", "children": []}, {"id": 697, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NIGR", "unique_id": "697"}, "text": "NIGER", "children": []}, {"id": 698, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NGRA", "unique_id": "698"}, "text": "NIGERIA", "children": []}, {"id": 699, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NIUE", "unique_id": "699"}, "text": "NIUE", "children": []}, {"id": 700, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NOIS", "unique_id": "700"}, "text": "NORFOLK ISLAND", "children": []}, {"id": 701, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NMAC", "unique_id": "701"}, "text": "NORTH MACEDONIA", "children": []}, {"id": 702, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NOIR", "unique_id": "702"}, "text": "NORTHERN IRELAND", "children": []}, {"id": 703, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NMAI", "unique_id": "703"}, "text": "NORTHERN MARIANA ISL", "children": []}, {"id": 704, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NORW", "unique_id": "704"}, "text": "NORWAY", "children": []}, {"id": 705, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "OMAN", "unique_id": "705"}, "text": "OMAN", "children": []}, {"id": 706, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PKSN", "unique_id": "706"}, "text": "PAKISTAN", "children": []}, {"id": 707, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PALA", "unique_id": "707"}, "text": "PALAU", "children": []}, {"id": 708, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PALE", "unique_id": "708"}, "text": "PALESTINIAN AUTHORTY", "children": []}, {"id": 709, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PANA", "unique_id": "709"}, "text": "PANAMA", "children": []}, {"id": 710, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "NGUI", "unique_id": "710"}, "text": "PAPUA NEW GUINEA", "children": []}, {"id": 711, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PARA", "unique_id": "711"}, "text": "PARAGUAY", "children": []}, {"id": 712, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PERU", "unique_id": "712"}, "text": "PERU", "children": []}, {"id": 713, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PHIL", "unique_id": "713"}, "text": "PHILIPPINES", "children": []}, {"id": 714, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PIIS", "unique_id": "714"}, "text": "PITCAIRN", "children": []}, {"id": 715, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PLIS", "unique_id": "715"}, "text": "PLEASANT ISLAND", "children": []}, {"id": 716, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "POLA", "unique_id": "716"}, "text": "POLAND", "children": []}, {"id": 717, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PORL", "unique_id": "717"}, "text": "PORTUGAL", "children": []}, {"id": 718, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "PRIC", "unique_id": "718"}, "text": "PUERTO RICO", "children": []}, {"id": 719, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "QATA", "unique_id": "719"}, "text": "QATAR", "children": []}, {"id": 720, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "REIS", "unique_id": "720"}, "text": "REUNION", "children": []}, {"id": 721, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ROUM", "unique_id": "721"}, "text": "ROMANIA", "children": []}, {"id": 722, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ROMN", "unique_id": "722"}, "text": "ROMANIA PRE 1/2/2002", "children": []}, {"id": 723, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RFED", "unique_id": "723"}, "text": "RUSSIAN FEDERATION", "children": []}, {"id": 724, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "RWAN", "unique_id": "724"}, "text": "RWANDA", "children": []}, {"id": 725, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STBA", "unique_id": "725"}, "text": "SAINT BARTHELEMY", "children": []}, {"id": 726, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SHTC", "unique_id": "726"}, "text": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA", "children": []}, {"id": 727, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STLU", "unique_id": "727"}, "text": "SAINT LUCIA", "children": []}, {"id": 728, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STMA", "unique_id": "728"}, "text": "SAINT MARTIN", "children": []}, {"id": 729, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SAMO", "unique_id": "729"}, "text": "SAMOA", "children": []}, {"id": 730, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SMAR", "unique_id": "730"}, "text": "SAN MARINO", "children": []}, {"id": 731, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STPR", "unique_id": "731"}, "text": "SAO TOME & PRINCIPE", "children": []}, {"id": 732, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SAAR", "unique_id": "732"}, "text": "SAUDI ARABIA", "children": []}, {"id": 733, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SCOT", "unique_id": "733"}, "text": "SCOTLAND", "children": []}, {"id": 734, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SENE", "unique_id": "734"}, "text": "SENEGAL", "children": []}, {"id": 735, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SERB", "unique_id": "735"}, "text": "SERBIA", "children": []}, {"id": 736, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SEMO", "unique_id": "736"}, "text": "SERBIA AND MONTENEGRO", "children": []}, {"id": 737, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SEYC", "unique_id": "737"}, "text": "SEYCHELLES", "children": []}, {"id": 738, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLEO", "unique_id": "738"}, "text": "SIERRA LEONE", "children": []}, {"id": 739, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SING", "unique_id": "739"}, "text": "SINGAPORE", "children": []}, {"id": 740, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SXMN", "unique_id": "740"}, "text": "SINT MAARTEN (DUTCH PART)", "children": []}, {"id": 741, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SVKA", "unique_id": "741"}, "text": "SLOVAK REPUBLIC", "children": []}, {"id": 742, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SLOV", "unique_id": "742"}, "text": "SLOVENIA", "children": []}, {"id": 743, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SOLI", "unique_id": "743"}, "text": "SOLOMON ISLANDS", "children": []}, {"id": 744, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SOMA", "unique_id": "744"}, "text": "SOMALIA", "children": []}, {"id": 745, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SAFR", "unique_id": "745"}, "text": "SOUTH AFRICA", "children": []}, {"id": 746, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SSDN", "unique_id": "746"}, "text": "SOUTH SUDAN", "children": []}, {"id": 747, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SPAI", "unique_id": "747"}, "text": "SPAIN", "children": []}, {"id": 748, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SRIL", "unique_id": "748"}, "text": "SRI LANKA", "children": []}, {"id": 749, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SHEL", "unique_id": "749"}, "text": "ST HELENA", "children": []}, {"id": 750, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SCKN", "unique_id": "750"}, "text": "ST KITTS AND NEVIS", "children": []}, {"id": 751, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STPM", "unique_id": "751"}, "text": "ST PIERRE & MIQUELON", "children": []}, {"id": 752, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "STVG", "unique_id": "752"}, "text": "ST VINCENT/GRENADINE", "children": []}, {"id": 753, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SUDA", "unique_id": "753"}, "text": "SUDAN", "children": []}, {"id": 754, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SURI", "unique_id": "754"}, "text": "SURINAME", "children": []}, {"id": 755, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SAJM", "unique_id": "755"}, "text": "SVALBARD & JAN MAYEN", "children": []}, {"id": 756, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWAZ", "unique_id": "756"}, "text": "SWAZILAND", "children": []}, {"id": 757, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWED", "unique_id": "757"}, "text": "SWEDEN", "children": []}, {"id": 758, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SWIT", "unique_id": "758"}, "text": "SWITZERLAND", "children": []}, {"id": 759, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "SYRI", "unique_id": "759"}, "text": "SYRIA", "children": []}, {"id": 760, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TAHI", "unique_id": "760"}, "text": "TAHITI", "children": []}, {"id": 761, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TAIW", "unique_id": "761"}, "text": "TAIWAN", "children": []}, {"id": 762, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TADZ", "unique_id": "762"}, "text": "TAJIKISTAN", "children": []}, {"id": 763, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TANZ", "unique_id": "763"}, "text": "TANZANIA", "children": []}, {"id": 764, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "THAI", "unique_id": "764"}, "text": "THAILAND", "children": []}, {"id": 765, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TIBE", "unique_id": "765"}, "text": "TIBET (SO STATED)", "children": []}, {"id": 766, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ETIM", "unique_id": "766"}, "text": "TIMOR, EAST", "children": []}, {"id": 767, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TILE", "unique_id": "767"}, "text": "TIMOR-LESTE", "children": []}, {"id": 768, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TOGO", "unique_id": "768"}, "text": "TOGO", "children": []}, {"id": 769, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TOKE", "unique_id": "769"}, "text": "TOKELAU", "children": []}, {"id": 770, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TONG", "unique_id": "770"}, "text": "TONGA", "children": []}, {"id": 771, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TRIN", "unique_id": "771"}, "text": "TRINIDAD AND TOBAGO", "children": []}, {"id": 772, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUNI", "unique_id": "772"}, "text": "TUNISIA", "children": []}, {"id": 773, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TURE", "unique_id": "773"}, "text": "TURKIYE", "children": []}, {"id": 774, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TURM", "unique_id": "774"}, "text": "TURKMENISTAN", "children": []}, {"id": 775, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TCIS", "unique_id": "775"}, "text": "TURKS AND CAICOS ISL", "children": []}, {"id": 776, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "TUVU", "unique_id": "776"}, "text": "TUVALU", "children": []}, {"id": 777, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "USOI", "unique_id": "777"}, "text": "U.S. MINOR ISLANDS", "children": []}, {"id": 778, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "USSR", "unique_id": "778"}, "text": "U.S.S.R.", "children": []}, {"id": 779, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UGAN", "unique_id": "779"}, "text": "UGANDA", "children": []}, {"id": 780, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UKRA", "unique_id": "780"}, "text": "UKRAINE", "children": []}, {"id": 781, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UAEM", "unique_id": "781"}, "text": "UNITED ARAB EMIRATES", "children": []}, {"id": 782, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UK", "unique_id": "782"}, "text": "UNITED KINGDOM", "children": []}, {"id": 783, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "USA", "unique_id": "783"}, "text": "UNITED STATES", "children": []}, {"id": 784, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "URUG", "unique_id": "784"}, "text": "URUGUAY", "children": []}, {"id": 785, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "UZBE", "unique_id": "785"}, "text": "UZBEKISTAN", "children": []}, {"id": 786, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VANU", "unique_id": "786"}, "text": "VANUATU", "children": []}, {"id": 787, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VCIT", "unique_id": "787"}, "text": "VATICAN CITY STATE", "children": []}, {"id": 788, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VENE", "unique_id": "788"}, "text": "VENEZUELA", "children": []}, {"id": 789, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VIET", "unique_id": "789"}, "text": "VIETNAM", "children": []}, {"id": 790, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VIIS", "unique_id": "790"}, "text": "VIRGIN ISLANDS (U.S.)", "children": []}, {"id": 791, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "VIUK", "unique_id": "791"}, "text": "VIRGIN ISLNDS (BRIT)", "children": []}, {"id": 792, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "WALE", "unique_id": "792"}, "text": "WALES", "children": []}, {"id": 793, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "WAFU", "unique_id": "793"}, "text": "WALLIS & FUTUNA ISL", "children": []}, {"id": 794, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "YEME", "unique_id": "794"}, "text": "YEMEN", "children": []}, {"id": 795, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "FRY", "unique_id": "795"}, "text": "YUGOSLAVIA", "children": []}, {"id": 796, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZAIR", "unique_id": "796"}, "text": "ZAIRE", "children": []}, {"id": 797, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZAMB", "unique_id": "797"}, "text": "ZAMBIA", "children": []}, {"id": 798, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "ZIMB", "unique_id": "798"}, "text": "ZIMBABWE", "children": []}]}, {"id": 799, "marker": "X", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a11e0b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Country of birth", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0056.aspx", "target": "help_elp_h0056", "rel": "noopener noreferrer", "unique_id": "799"}, "text": "\u200b", "children": []}, {"id": 800, "marker": "AFW", "tagName": "label", "attributes": {"for": "_2a0j0a0a0e0a0a2a13c0b0a_input", "id": "_2a0j0a0a0e0a0a2a13c0a0", "class": "wc-label", "unique_id": "800"}, "text": "Relationship status", "children": []}, {"id": 801, "marker": "AKW", "tagName": "select", "attributes": {"id": "_2a0j0a0a0e0a0a2a13c0b0a_input", "name": "_2a0j0a0a0e0a0a2a13c0b0a", "unique_id": "801", "options": [{"optionIndex": 0, "text": ""}, {"optionIndex": 1, "text": "De Facto"}, {"optionIndex": 2, "text": "Divorced"}, {"optionIndex": 3, "text": "Engaged"}, {"optionIndex": 4, "text": "Married"}, {"optionIndex": 5, "text": "Never Married"}, {"optionIndex": 6, "text": "Separated"}, {"optionIndex": 7, "text": "Widowed"}]}, "text": "De FactoDivorcedEngagedMarriedNever MarriedSeparatedWidowed", "children": [{"id": 802, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "", "data-wc-null": "1", "selected": "selected", "unique_id": "802"}, "text": "", "children": []}, {"id": 803, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "F", "unique_id": "803"}, "text": "De Facto", "children": []}, {"id": 804, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "D", "unique_id": "804"}, "text": "Divorced", "children": []}, {"id": 805, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "E", "unique_id": "805"}, "text": "Engaged", "children": []}, {"id": 806, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "M", "unique_id": "806"}, "text": "Married", "children": []}, {"id": 807, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "N", "unique_id": "807"}, "text": "Never Married", "children": []}, {"id": 808, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "S", "unique_id": "808"}, "text": "Separated", "children": []}, {"id": 809, "marker": "", "tagName": "option", "attributes": {"class": "wc-option", "value": "W", "unique_id": "809"}, "text": "Widowed", "children": []}]}, {"id": 810, "marker": "AMW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a13c0b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Relationship status", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0060.aspx", "target": "help_elp_h0060", "rel": "noopener noreferrer", "unique_id": "810"}, "text": "\u200b", "children": []}, {"id": 811, "marker": "APW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "811"}, "text": "Yes", "children": [{"id": 812, "marker": "APW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a14c1b0a", "value": "1", "id": "d1966273077e636", "style": "", "unique_id": "812"}, "text": "", "children": []}]}, {"id": 813, "marker": "AWW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "813"}, "text": "No", "children": [{"id": 814, "marker": "AWW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a14c1b0a", "value": "2", "id": "d1966273077e638", "style": "", "unique_id": "814"}, "text": "", "children": []}]}, {"id": 815, "marker": "FFW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a14c1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Other names/spellings", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0061.aspx", "target": "help_elp_h0061", "rel": "noopener noreferrer", "unique_id": "815"}, "text": "\u200b", "children": []}, {"id": 816, "marker": "FKW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "816"}, "text": "Yes", "children": [{"id": 817, "marker": "FKW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a15c1b0a", "value": "1", "id": "d1966273077e733", "style": "", "unique_id": "817"}, "text": "", "children": []}]}, {"id": 818, "marker": "FMW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "818"}, "text": "No", "children": [{"id": 819, "marker": "FMW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a15c1b0a", "value": "2", "id": "d1966273077e735", "style": "", "unique_id": "819"}, "text": "", "children": []}]}, {"id": 820, "marker": "FPW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a15c1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Citizen of country of passport", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h1665.aspx", "target": "help_elp_h1665", "rel": "noopener noreferrer", "unique_id": "820"}, "text": "\u200b", "children": []}, {"id": 821, "marker": "FWW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "821"}, "text": "Yes", "children": [{"id": 822, "marker": "FWW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a15d1b0a", "value": "1", "id": "d1966273077e755", "style": "", "unique_id": "822"}, "text": "", "children": []}]}, {"id": 823, "marker": "HFW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "823"}, "text": "No", "children": [{"id": 824, "marker": "HFW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a15d1b0a", "value": "2", "id": "d1966273077e757", "style": "", "unique_id": "824"}, "text": "", "children": []}]}, {"id": 825, "marker": "HKW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a15d1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Citizen of any other country", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h1670.aspx", "target": "help_elp_h1670", "rel": "noopener noreferrer", "unique_id": "825"}, "text": "\u200b", "children": []}, {"id": 826, "marker": "HMW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "826"}, "text": "Yes", "children": [{"id": 827, "marker": "HMW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a16c1b0", "value": "1", "id": "d1966273077e2004", "style": "", "unique_id": "827"}, "text": "", "children": []}]}, {"id": 828, "marker": "HW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "828"}, "text": "No", "children": [{"id": 829, "marker": "HW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a16c1b0", "value": "2", "id": "d1966273077e2006", "style": "", "unique_id": "829"}, "text": "", "children": []}]}, {"id": 830, "marker": "HWW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "830"}, "text": "Yes", "children": [{"id": 831, "marker": "HWW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a16d1b0", "value": "1", "id": "d1966273077e2019", "style": "", "unique_id": "831"}, "text": "", "children": []}]}, {"id": 832, "marker": "KFW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "832"}, "text": "No", "children": [{"id": 833, "marker": "KFW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a16d1b0", "value": "2", "id": "d1966273077e2021", "style": "", "unique_id": "833"}, "text": "", "children": []}]}, {"id": 834, "marker": "KKW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "834"}, "text": "Yes", "children": [{"id": 835, "marker": "KKW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a16e2b1a0", "value": "1", "id": "d1966273077e2050", "style": "", "unique_id": "835"}, "text": "", "children": []}]}, {"id": 836, "marker": "KMW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "836"}, "text": "No", "children": [{"id": 837, "marker": "KMW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a16e2b1a0", "value": "2", "id": "d1966273077e2052", "style": "", "unique_id": "837"}, "text": "", "children": []}]}, {"id": 838, "marker": "KPW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a16e2b1a1", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Australian visa grant number", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0100.aspx", "target": "help_elp_h0100", "rel": "noopener noreferrer", "unique_id": "838"}, "text": "\u200b", "children": []}, {"id": 839, "marker": "KWW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "839"}, "text": "Yes", "children": [{"id": 840, "marker": "KWW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a17c1b0a", "value": "1", "id": "d1966273077e2103", "style": "", "unique_id": "840"}, "text": "", "children": []}]}, {"id": 841, "marker": "MFW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "841"}, "text": "No", "children": [{"id": 842, "marker": "MFW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a17c1b0a", "value": "2", "id": "d1966273077e2105", "style": "", "unique_id": "842"}, "text": "", "children": []}]}, {"id": 843, "marker": "MKW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a17c1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Does this applicant have any other passports or documents for travel?", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h2305.aspx", "target": "help_elp_h2305", "rel": "noopener noreferrer", "unique_id": "843"}, "text": "\u200b", "children": []}, {"id": 844, "marker": "MMW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "844"}, "text": "Yes", "children": [{"id": 845, "marker": "MMW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a18c1b0a", "value": "1", "id": "d1966273077e2384", "style": "", "unique_id": "845"}, "text": "", "children": []}]}, {"id": 846, "marker": "MWW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "846"}, "text": "No", "children": [{"id": 847, "marker": "MWW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a18c1b0a", "value": "2", "id": "d1966273077e2386", "style": "", "unique_id": "847"}, "text": "", "children": []}]}, {"id": 848, "marker": "PFW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a18c1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on National identity documents", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0075.aspx", "target": "help_elp_h0075", "rel": "noopener noreferrer", "unique_id": "848"}, "text": "\u200b", "children": []}, {"id": 849, "marker": "PKW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "849"}, "text": "Yes", "children": [{"id": 850, "marker": "PKW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a20c1b0a", "value": "1", "id": "d1966273077e2521", "style": "", "unique_id": "850"}, "text": "", "children": []}]}, {"id": 851, "marker": "PMW", "tagName": "label", "attributes": {"class": "wc-option", "unique_id": "851"}, "text": "No", "children": [{"id": 852, "marker": "PMW", "tagName": "input", "attributes": {"type": "radio", "name": "_2a0j0a0a0e0a0a2a20c1b0a", "value": "2", "id": "d1966273077e2523", "style": "", "unique_id": "852"}, "text": "", "children": []}]}, {"id": 853, "marker": "PWW", "tagName": "a", "attributes": {"id": "_2a0j0a0a0e0a0a2a20c1b0b", "class": "wc-link wc-icon fa-question-circle", "title": "Help on Undertaken a health examination", "href": "https://immi.homeaffairs.gov.au/help-text/eplus/Pages/elp-h0675.aspx", "target": "help_elp_h0675", "rel": "noopener noreferrer", "unique_id": "853"}, "text": "\u200b", "children": []}, {"id": 854, "marker": "SFW", "tagName": "button", "attributes": {"id": "_2a0j0a0a0g0", "name": "_2a0j0a0a0g0", "value": "x", "type": "submit", "class": "wc-button", "title": "Go to previous page", "unique_id": "854"}, "text": "Previous", "children": []}, {"id": 855, "marker": "SKW", "tagName": "button", "attributes": {"id": "_2a0j0a0a0g2", "name": "_2a0j0a0a0g2", "value": "x", "type": "submit", "class": "wc-button", "title": "Save entered details", "unique_id": "855"}, "text": "Save", "children": []}, {"id": 856, "marker": "SMW", "tagName": "button", "attributes": {"id": "_2a0j0a0a0g3", "name": "_2a0j0a0a0g3", "value": "x", "type": "submit", "class": "wc-button", "title": "Print details", "unique_id": "856"}, "text": "Print", "children": []}, {"id": 857, "marker": "SPW", "tagName": "button", "attributes": {"id": "_2a0j0a0a0g4", "name": "_2a0j0a0a0g4", "value": "x", "type": "submit", "class": "wc-button", "title": "Link to account page", "unique_id": "857"}, "text": "Go to my account", "children": []}, {"id": 858, "marker": "SWW", "tagName": "button", "attributes": {"id": "_2a0j0a0a0g1", "name": "_2a0j0a0a0g1", "value": "x", "type": "submit", "class": "wc-button", "title": "Go to next page", "data-wc-validate": "_2a0j0a0a", "unique_id": "858"}, "text": "Next", "children": []}, {"id": 859, "marker": "XA", "tagName": "a", "attributes": {"id": "_2a0j0b0a", "class": "wc-link", "href": "https://immi.homeaffairs.gov.au/visas/getting-a-visa/visa-listing/visitor-600", "target": "Visitorinformation", "rel": "noopener noreferrer", "unique_id": "859"}, "text": "Visitor information", "children": []}, {"id": 860, "marker": "XF", "tagName": "a", "attributes": {"id": "_2a0j0b0b", "class": "wc-link", "href": "https://immi.homeaffairs.gov.au/help-support/meeting-our-requirements/health", "target": "Healthdetails", "rel": "noopener noreferrer", "unique_id": "860"}, "text": "Health details", "children": []}, {"id": 861, "marker": "XK", "tagName": "a", "attributes": {"id": "_2a0j0b0c", "class": "wc-link", "href": "https://immi.homeaffairs.gov.au/visas/visa-pricing-estimator", "target": "VisaPricingEstimator", "rel": "noopener noreferrer", "unique_id": "861"}, "text": "Visa Pricing Estimator", "children": []}, {"id": 862, "marker": "XS", "tagName": "a", "attributes": {"id": "_2a0j0b0d", "class": "wc-link", "href": "https://immi.homeaffairs.gov.au/visas/getting-a-visa/visa-processing-times/global-visa-processing-times", "target": "Processingtimes", "rel": "noopener noreferrer", "unique_id": "862"}, "text": "Processing times", "children": []}, {"id": 863, "marker": "Y", "tagName": "a", "attributes": {"id": "_2a0j0b1a", "class": "wc-link", "href": "https://immi.homeaffairs.gov.au/help-support/contact-us", "target": "Contactus", "rel": "noopener noreferrer", "unique_id": "863"}, "text": "Contact us", "children": []}, {"id": 864, "marker": "YA", "tagName": "a", "attributes": {"id": "_2a0j0b1b", "class": "wc-link", "href": "https://www.homeaffairs.gov.au/access-and-accountability/our-commitments/plans-and-charters/our-service-charters", "target": "Clientservicecharter", "rel": "noopener noreferrer", "unique_id": "864"}, "text": "Client service charter", "children": []}, {"id": 865, "marker": "YF", "tagName": "a", "attributes": {"id": "_2a0j0b1c", "class": "wc-link", "href": "https://www.homeaffairs.gov.au/help-and-support/departmental-forms/online-forms/complaints-compliments-and-suggestions", "target": "Clientfeedback", "rel": "noopener noreferrer", "unique_id": "865"}, "text": "Client feedback", "children": []}, {"id": 866, "marker": "YK", "tagName": "a", "attributes": {"id": "_2a0j0b1d", "class": "wc-link", "href": "https://immi.homeaffairs.gov.au/help-support/applying-online-or-on-paper/online", "target": "ImmiAccountsupport", "rel": "noopener noreferrer", "unique_id": "866"}, "text": "ImmiAccount support", "children": []}, {"id": 867, "marker": "YS", "tagName": "a", "attributes": {"id": "_2a0j0b1e", "class": "wc-link", "href": "https://www.tisnational.gov.au/", "target": "Translationservices", "rel": "noopener noreferrer", "unique_id": "867"}, "text": "Translation services", "children": []}, {"id": 868, "marker": "WFW", "tagName": "a", "attributes": {"id": "_4a0a0", "class": "wc-link", "href": "https://www.homeaffairs.gov.au/access-and-accountability/using-our-website/accessibility", "target": "Accessibility", "rel": "noopener noreferrer", "unique_id": "868"}, "text": "Accessibility", "children": []}, {"id": 869, "marker": "WKW", "tagName": "a", "attributes": {"id": "_4a0a1", "class": "wc-link", "href": "https://www.homeaffairs.gov.au/access-and-accountability/using-our-website/online-security", "target": "OnlineSecurity", "rel": "noopener noreferrer", "unique_id": "869"}, "text": "Online Security", "children": []}, {"id": 870, "marker": "WMW", "tagName": "a", "attributes": {"id": "_4a0a2", "class": "wc-link", "href": "https://www.homeaffairs.gov.au/access-and-accountability/our-commitments/privacy", "target": "Privacy", "rel": "noopener noreferrer", "unique_id": "870"}, "text": "Privacy", "children": []}, {"id": 871, "marker": "WWW", "tagName": "a", "attributes": {"id": "_4a0a3", "class": "wc-link", "href": "https://www.homeaffairs.gov.au/access-and-accountability/using-our-website/copyright-and-disclaimer", "target": "CopyrightDisclaimer", "rel": "noopener noreferrer", "unique_id": "871"}, "text": "Copyright & Disclaimer", "children": []}]
diff --git a/tests/smoke_tests/data/extract_information_screenshot.png b/tests/smoke_tests/data/extract_information_screenshot.png
deleted file mode 100644
index 2f440cd3e..000000000
Binary files a/tests/smoke_tests/data/extract_information_screenshot.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/element_tree.json b/tests/smoke_tests/data/geico_closest_coverage/element_tree.json
deleted file mode 100644
index 3303d4ad9..000000000
--- a/tests/smoke_tests/data/geico_closest_coverage/element_tree.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"id":0,"tagName":"a","attributes":{"data-side-panel-trigger":"menu","class":"hamburger-menu","href":"#","aria-expanded":"false","unique_id":"0"},"text":"Menu","children":[{"id":1,"tagName":"span","attributes":{"unique_id":"1"},"text":"","children":[]},{"id":2,"tagName":"span","attributes":{"unique_id":"2"},"text":"","children":[]},{"id":3,"tagName":"span","attributes":{"unique_id":"3"},"text":"","children":[]},{"id":4,"tagName":"span","attributes":{"unique_id":"4"},"text":"","children":[]},{"id":5,"tagName":"span","attributes":{"class":"header-link","unique_id":"5"},"text":"Menu","children":[]}]},{"id":6,"tagName":"a","attributes":{"class":"title active h4","href":"#","unique_id":"6"},"text":"<Edit Prior Info","children":[]},{"id":7,"tagName":"a","attributes":{"href":"#","class":"view-more-less-link","aria-expanded":"false","unique_id":"7"},"text":"VIEW BREAKDOWN","children":[{"id":8,"tagName":"span","attributes":{"class":"view-more-link-title","unique_id":"8"},"text":"VIEW BREAKDOWN","children":[]},{"id":9,"tagName":"span","attributes":{"class":"view-more-link-icon","unique_id":"9"},"text":"","children":[]}]},{"id":10,"tagName":"a","attributes":{"href":"#","class":"nobr","unique_id":"10"},"text":"View Details","children":[]},{"id":11,"tagName":"button","attributes":{"id":"Id_Purchase_39313","type":"submit","class":"btn btn--primary btn--full-mobile btn--pull-right","unique_id":"11"},"text":"Next","children":[{"id":12,"tagName":"span","attributes":{"unique_id":"12"},"text":"Next","children":[]}]},{"id":13,"tagName":"button","attributes":{"id":"Id_QuoteReviewBackToPackageSelect_44975","type":"submit","class":"btn btn--secondary btn--full-mobile btn--pull-right","unique_id":"13"},"text":"Back To Coverage Options","children":[{"id":14,"tagName":"span","attributes":{"unique_id":"14"},"text":"Back To Coverage Options","children":[]}]},{"id":15,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_Auto_58587-btn","class":"tooltip-trigger","data-tooltip-view":"Id_Auto_58587-tooltip","aria-labelledby":"Id_Auto_58587-label","tabindex":"0","unique_id":"15"},"text":"","children":[{"id":16,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"16"},"text":"","children":[]}]},{"id":17,"tagName":"a","attributes":{"href":"#","class":"nobr","unique_id":"17"},"text":"What is full coverage?","children":[]},{"id":18,"tagName":"a","attributes":{"href":"#","class":"nobr","unique_id":"18"},"text":"Need help with your rate or coverages?","children":[]},{"id":19,"tagName":"label","attributes":{"for":"Id_7f185eb6-cd53-43cd-bb42-bc2a09a713a8_24656","id":"Id_7f185eb6-cd53-43cd-bb42-bc2a09a713a8_24656-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"19"},"text":"Bodily Injury Liability (BI)","children":[{"id":20,"tagName":"span","attributes":{"unique_id":"20"},"text":"Bodily Injury Liability (BI)","children":[]},{"id":21,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"21"},"text":"","children":[{"id":22,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_7f185eb6-cd53-43cd-bb42-bc2a09a713a8_24656-btn","class":"tooltip-trigger","data-tooltip-view":"Id_7f185eb6-cd53-43cd-bb42-bc2a09a713a8_24656-tooltip","aria-labelledby":"Id_7f185eb6-cd53-43cd-bb42-bc2a09a713a8_24656-label","tabindex":"-1","unique_id":"22"},"text":"","children":[{"id":23,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"23"},"text":"","children":[]}]}]}]},{"id":24,"tagName":"select","attributes":{"id":"Id_7f185eb6-cd53-43cd-bb42-bc2a09a713a8_24656","aria-invalid":"false","data-formotivid":"0001","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"24","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$15,000/$30,000"},{"optionIndex":2,"text":"$20,000/$40,000"},{"optionIndex":3,"text":"$25,000/$50,000"},{"optionIndex":4,"text":"$30,000/$60,000"},{"optionIndex":5,"text":"$50,000/$100,000"},{"optionIndex":6,"text":"$100,000/$200,000"},{"optionIndex":7,"text":"$100,000/$300,000"},{"optionIndex":8,"text":"$300,000/$300,000"},{"optionIndex":9,"text":"$300,000/$500,000"}]},"text":"Please Select$15,000/$30,000$20,000/$40,000$25,000/$50,000$30,000/$60,000$50,000/$100,000$100,000/$200,000$100,000/$300,000$300,000/$300,000$300,000/$500,000","children":[{"id":25,"tagName":"option","attributes":{"code":"000021_0000","value":"$15,000/$30,000","unique_id":"25"},"text":"$15,000/$30,000","children":[]},{"id":26,"tagName":"option","attributes":{"code":"000031_0000","value":"$20,000/$40,000","unique_id":"26"},"text":"$20,000/$40,000","children":[]},{"id":27,"tagName":"option","attributes":{"code":"000041_0000","value":"$25,000/$50,000","unique_id":"27"},"text":"$25,000/$50,000","children":[]},{"id":28,"tagName":"option","attributes":{"code":"000046_0000","value":"$30,000/$60,000","unique_id":"28"},"text":"$30,000/$60,000","children":[]},{"id":29,"tagName":"option","attributes":{"code":"000051_0000","value":"$50,000/$100,000","unique_id":"29"},"text":"$50,000/$100,000","children":[]},{"id":30,"tagName":"option","attributes":{"code":"000056_0000","value":"$100,000/$200,000","unique_id":"30"},"text":"$100,000/$200,000","children":[]},{"id":31,"tagName":"option","attributes":{"code":"000061_0000","value":"$100,000/$300,000","unique_id":"31"},"text":"$100,000/$300,000","children":[]},{"id":32,"tagName":"option","attributes":{"code":"000065_0000","value":"$300,000/$300,000","unique_id":"32"},"text":"$300,000/$300,000","children":[]},{"id":33,"tagName":"option","attributes":{"code":"000069_0000","value":"$300,000/$500,000","unique_id":"33"},"text":"$300,000/$500,000","children":[]}]},{"id":34,"tagName":"label","attributes":{"for":"Id_e15d35d1-a13e-4658-9abb-d6411cb93ca2_51389","id":"Id_e15d35d1-a13e-4658-9abb-d6411cb93ca2_51389-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"34"},"text":"Property Damage Liability (PD)","children":[{"id":35,"tagName":"span","attributes":{"unique_id":"35"},"text":"Property Damage Liability (PD)","children":[]},{"id":36,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"36"},"text":"","children":[{"id":37,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_e15d35d1-a13e-4658-9abb-d6411cb93ca2_51389-btn","class":"tooltip-trigger","data-tooltip-view":"Id_e15d35d1-a13e-4658-9abb-d6411cb93ca2_51389-tooltip","aria-labelledby":"Id_e15d35d1-a13e-4658-9abb-d6411cb93ca2_51389-label","tabindex":"-1","unique_id":"37"},"text":"","children":[{"id":38,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"38"},"text":"","children":[]}]}]}]},{"id":39,"tagName":"select","attributes":{"id":"Id_e15d35d1-a13e-4658-9abb-d6411cb93ca2_51389","aria-invalid":"false","data-formotivid":"0002","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"39","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$5,000"},{"optionIndex":2,"text":"$10,000"},{"optionIndex":3,"text":"$15,000"},{"optionIndex":4,"text":"$20,000"},{"optionIndex":5,"text":"$25,000"},{"optionIndex":6,"text":"$50,000"},{"optionIndex":7,"text":"$100,000"}]},"text":"Please Select$5,000$10,000$15,000$20,000$25,000$50,000$100,000","children":[{"id":40,"tagName":"option","attributes":{"code":"005000_0000","value":"$5,000","unique_id":"40"},"text":"$5,000","children":[]},{"id":41,"tagName":"option","attributes":{"code":"010000_0000","value":"$10,000","unique_id":"41"},"text":"$10,000","children":[]},{"id":42,"tagName":"option","attributes":{"code":"015000_0000","value":"$15,000","unique_id":"42"},"text":"$15,000","children":[]},{"id":43,"tagName":"option","attributes":{"code":"020000_0000","value":"$20,000","unique_id":"43"},"text":"$20,000","children":[]},{"id":44,"tagName":"option","attributes":{"code":"025000_0000","value":"$25,000","unique_id":"44"},"text":"$25,000","children":[]},{"id":45,"tagName":"option","attributes":{"code":"050000_0000","value":"$50,000","unique_id":"45"},"text":"$50,000","children":[]},{"id":46,"tagName":"option","attributes":{"code":"000101_0000","value":"$100,000","unique_id":"46"},"text":"$100,000","children":[]}]},{"id":47,"tagName":"label","attributes":{"for":"Id_682b9fdc-4c67-4a6d-8726-8768812c85e5_72178","id":"Id_682b9fdc-4c67-4a6d-8726-8768812c85e5_72178-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"47"},"text":"Medical Payments (MED)","children":[{"id":48,"tagName":"span","attributes":{"unique_id":"48"},"text":"Medical Payments (MED)","children":[]},{"id":49,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"49"},"text":"","children":[{"id":50,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_682b9fdc-4c67-4a6d-8726-8768812c85e5_72178-btn","class":"tooltip-trigger","data-tooltip-view":"Id_682b9fdc-4c67-4a6d-8726-8768812c85e5_72178-tooltip","aria-labelledby":"Id_682b9fdc-4c67-4a6d-8726-8768812c85e5_72178-label","tabindex":"-1","unique_id":"50"},"text":"","children":[{"id":51,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"51"},"text":"","children":[]}]}]}]},{"id":52,"tagName":"select","attributes":{"id":"Id_682b9fdc-4c67-4a6d-8726-8768812c85e5_72178","aria-invalid":"false","data-formotivid":"0003","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"52","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$1,000"},{"optionIndex":3,"text":"$2,000"},{"optionIndex":4,"text":"$3,000"},{"optionIndex":5,"text":"$4,000"},{"optionIndex":6,"text":"$5,000"},{"optionIndex":7,"text":"$7,500"},{"optionIndex":8,"text":"$10,000"},{"optionIndex":9,"text":"$25,000"}]},"text":"Please SelectI decline$1,000$2,000$3,000$4,000$5,000$7,500$10,000$25,000","children":[{"id":53,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"53"},"text":"I decline","children":[]},{"id":54,"tagName":"option","attributes":{"code":"001000_0000","value":"$1,000","unique_id":"54"},"text":"$1,000","children":[]},{"id":55,"tagName":"option","attributes":{"code":"002000_0000","value":"$2,000","unique_id":"55"},"text":"$2,000","children":[]},{"id":56,"tagName":"option","attributes":{"code":"003000_0000","value":"$3,000","unique_id":"56"},"text":"$3,000","children":[]},{"id":57,"tagName":"option","attributes":{"code":"004000_0000","value":"$4,000","unique_id":"57"},"text":"$4,000","children":[]},{"id":58,"tagName":"option","attributes":{"code":"005000_0000","value":"$5,000","unique_id":"58"},"text":"$5,000","children":[]},{"id":59,"tagName":"option","attributes":{"code":"007500_0000","value":"$7,500","unique_id":"59"},"text":"$7,500","children":[]},{"id":60,"tagName":"option","attributes":{"code":"010000_0000","value":"$10,000","unique_id":"60"},"text":"$10,000","children":[]},{"id":61,"tagName":"option","attributes":{"code":"025000_0000","value":"$25,000","unique_id":"61"},"text":"$25,000","children":[]}]},{"id":62,"tagName":"label","attributes":{"for":"Id_e77323c2-67da-4c49-8582-5c476f8c9f4b_92904","id":"Id_e77323c2-67da-4c49-8582-5c476f8c9f4b_92904-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"62"},"text":"Uninsured & Underinsured Motorist","children":[{"id":63,"tagName":"span","attributes":{"unique_id":"63"},"text":"Uninsured & Underinsured Motorist","children":[]},{"id":64,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"64"},"text":"","children":[{"id":65,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_e77323c2-67da-4c49-8582-5c476f8c9f4b_92904-btn","class":"tooltip-trigger","data-tooltip-view":"Id_e77323c2-67da-4c49-8582-5c476f8c9f4b_92904-tooltip","aria-labelledby":"Id_e77323c2-67da-4c49-8582-5c476f8c9f4b_92904-label","tabindex":"-1","unique_id":"65"},"text":"","children":[{"id":66,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"66"},"text":"","children":[]}]}]}]},{"id":67,"tagName":"select","attributes":{"id":"Id_e77323c2-67da-4c49-8582-5c476f8c9f4b_92904","aria-invalid":"false","data-formotivid":"0086","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"67","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$15,000/$30,000"},{"optionIndex":3,"text":"$20,000/$40,000"},{"optionIndex":4,"text":"$25,000/$50,000"},{"optionIndex":5,"text":"$30,000/$60,000"},{"optionIndex":6,"text":"$50,000/$100,000"},{"optionIndex":7,"text":"$100,000/$200,000"},{"optionIndex":8,"text":"$100,000/$300,000"},{"optionIndex":9,"text":"$300,000/$300,000"},{"optionIndex":10,"text":"$300,000/$500,000"}]},"text":"Please SelectI decline$15,000/$30,000$20,000/$40,000$25,000/$50,000$30,000/$60,000$50,000/$100,000$100,000/$200,000$100,000/$300,000$300,000/$300,000$300,000/$500,000","children":[{"id":68,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"68"},"text":"I decline","children":[]},{"id":69,"tagName":"option","attributes":{"code":"000021_0000","value":"$15,000/$30,000","unique_id":"69"},"text":"$15,000/$30,000","children":[]},{"id":70,"tagName":"option","attributes":{"code":"000031_0000","value":"$20,000/$40,000","unique_id":"70"},"text":"$20,000/$40,000","children":[]},{"id":71,"tagName":"option","attributes":{"code":"000041_0000","value":"$25,000/$50,000","unique_id":"71"},"text":"$25,000/$50,000","children":[]},{"id":72,"tagName":"option","attributes":{"code":"000046_0000","value":"$30,000/$60,000","unique_id":"72"},"text":"$30,000/$60,000","children":[]},{"id":73,"tagName":"option","attributes":{"code":"000051_0000","value":"$50,000/$100,000","unique_id":"73"},"text":"$50,000/$100,000","children":[]},{"id":74,"tagName":"option","attributes":{"code":"000056_0000","value":"$100,000/$200,000","unique_id":"74"},"text":"$100,000/$200,000","children":[]},{"id":75,"tagName":"option","attributes":{"code":"000061_0000","value":"$100,000/$300,000","unique_id":"75"},"text":"$100,000/$300,000","children":[]},{"id":76,"tagName":"option","attributes":{"code":"000065_0000","value":"$300,000/$300,000","unique_id":"76"},"text":"$300,000/$300,000","children":[]},{"id":77,"tagName":"option","attributes":{"code":"000069_0000","value":"$300,000/$500,000","unique_id":"77"},"text":"$300,000/$500,000","children":[]}]},{"id":78,"tagName":"label","attributes":{"for":"Id_af61d23b-c855-4f61-9432-8cb7a500d56d_43900","id":"Id_af61d23b-c855-4f61-9432-8cb7a500d56d_43900-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"78"},"text":"Comprehensive (Excluding Collision)","children":[{"id":79,"tagName":"span","attributes":{"unique_id":"79"},"text":"Comprehensive (Excluding Collision)","children":[]},{"id":80,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"80"},"text":"","children":[{"id":81,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_af61d23b-c855-4f61-9432-8cb7a500d56d_43900-btn","class":"tooltip-trigger","data-tooltip-view":"Id_af61d23b-c855-4f61-9432-8cb7a500d56d_43900-tooltip","aria-labelledby":"Id_af61d23b-c855-4f61-9432-8cb7a500d56d_43900-label","tabindex":"-1","unique_id":"81"},"text":"","children":[{"id":82,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"82"},"text":"","children":[]}]}]}]},{"id":83,"tagName":"select","attributes":{"id":"Id_af61d23b-c855-4f61-9432-8cb7a500d56d_43900","aria-invalid":"false","data-formotivid":"0005","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"83","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"No deductible"},{"optionIndex":2,"text":"$50 deductible"},{"optionIndex":3,"text":"$100 deductible"},{"optionIndex":4,"text":"$200 deductible"},{"optionIndex":5,"text":"$250 deductible"},{"optionIndex":6,"text":"$500 deductible"},{"optionIndex":7,"text":"$1,000 deductible"},{"optionIndex":8,"text":"$1,500 deductible"},{"optionIndex":9,"text":"$2,000 deductible"},{"optionIndex":10,"text":"$2,500 deductible"},{"optionIndex":11,"text":"I decline"}]},"text":"Please SelectNo deductible$50 deductible$100 deductible$200 deductible$250 deductible$500 deductible$1,000 deductible$1,500 deductible$2,000 deductible$2,500 deductibleI decline","children":[{"id":84,"tagName":"option","attributes":{"code":"000000_0000","value":"No deductible","unique_id":"84"},"text":"No deductible","children":[]},{"id":85,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"85"},"text":"$50 deductible","children":[]},{"id":86,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"86"},"text":"$100 deductible","children":[]},{"id":87,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"87"},"text":"$200 deductible","children":[]},{"id":88,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"88"},"text":"$250 deductible","children":[]},{"id":89,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"89"},"text":"$500 deductible","children":[]},{"id":90,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"90"},"text":"$1,000 deductible","children":[]},{"id":91,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"91"},"text":"$1,500 deductible","children":[]},{"id":92,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"92"},"text":"$2,000 deductible","children":[]},{"id":93,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"93"},"text":"$2,500 deductible","children":[]},{"id":94,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"94"},"text":"I decline","children":[]}]},{"id":95,"tagName":"label","attributes":{"for":"Id_52e94398-34b5-439a-9062-b45810775071_57743","id":"Id_52e94398-34b5-439a-9062-b45810775071_57743-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"95"},"text":"Collision (COLL)","children":[{"id":96,"tagName":"span","attributes":{"unique_id":"96"},"text":"Collision (COLL)","children":[]},{"id":97,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"97"},"text":"","children":[{"id":98,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_52e94398-34b5-439a-9062-b45810775071_57743-btn","class":"tooltip-trigger","data-tooltip-view":"Id_52e94398-34b5-439a-9062-b45810775071_57743-tooltip","aria-labelledby":"Id_52e94398-34b5-439a-9062-b45810775071_57743-label","tabindex":"-1","unique_id":"98"},"text":"","children":[{"id":99,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"99"},"text":"","children":[]}]}]}]},{"id":100,"tagName":"select","attributes":{"id":"Id_52e94398-34b5-439a-9062-b45810775071_57743","aria-invalid":"false","data-formotivid":"0007","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"100","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$25 deductible"},{"optionIndex":2,"text":"$25 deductible/Collision Deductible Waiver"},{"optionIndex":3,"text":"$50 deductible"},{"optionIndex":4,"text":"$50 deductible/Collision Deductible Waiver"},{"optionIndex":5,"text":"$100 deductible"},{"optionIndex":6,"text":"$100 deductible/Collision Deductible Waiver"},{"optionIndex":7,"text":"$150 deductible"},{"optionIndex":8,"text":"$150 deductible/Collision Deductible Waiver"},{"optionIndex":9,"text":"$200 deductible"},{"optionIndex":10,"text":"$200 deductible/Collision Deductible Waiver"},{"optionIndex":11,"text":"$250 deductible"},{"optionIndex":12,"text":"$250 deductible/Collision Deductible Waiver"},{"optionIndex":13,"text":"$500 deductible"},{"optionIndex":14,"text":"$500 deductible/Collision Deductible Waiver"},{"optionIndex":15,"text":"$1,000 deductible"},{"optionIndex":16,"text":"$1,000 deductible/Collision Deductible Waiver"},{"optionIndex":17,"text":"$1,500 deductible"},{"optionIndex":18,"text":"$1,500 deductible/Collision Deductible Waiver"},{"optionIndex":19,"text":"$2,000 deductible"},{"optionIndex":20,"text":"$2,000 deductible/Collision Deductible Waiver"},{"optionIndex":21,"text":"$2,500 deductible"},{"optionIndex":22,"text":"$2,500 deductible/Collision Deductible Waiver"},{"optionIndex":23,"text":"I decline"}]},"text":"Please Select$25 deductible$25 deductible/Collision Deductible Waiver$50 deductible$50 deductible/Collision Deductible Waiver$100 deductible$100 deductible/Collision Deductible Waiver$150 deductible$150 deductible/Collision Deductible Waiver$200 deductible$200 deductible/Collision Deductible Waiver$250 deductible$250 deductible/Collision Deductible Waiver$500 deductible$500 deductible/Collision Deductible Waiver$1,000 deductible$1,000 deductible/Collision Deductible Waiver$1,500 deductible$1,500 deductible/Collision Deductible Waiver$2,000 deductible$2,000 deductible/Collision Deductible Waiver$2,500 deductible$2,500 deductible/Collision Deductible WaiverI decline","children":[{"id":101,"tagName":"option","attributes":{"code":"000000_0001","value":"$25 deductible","unique_id":"101"},"text":"$25 deductible","children":[]},{"id":102,"tagName":"option","attributes":{"code":"000000_0034","value":"$25 deductible/Collision Deductible Waiver","unique_id":"102"},"text":"$25 deductible/Collision Deductible Waiver","children":[]},{"id":103,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"103"},"text":"$50 deductible","children":[]},{"id":104,"tagName":"option","attributes":{"code":"000000_0035","value":"$50 deductible/Collision Deductible Waiver","unique_id":"104"},"text":"$50 deductible/Collision Deductible Waiver","children":[]},{"id":105,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"105"},"text":"$100 deductible","children":[]},{"id":106,"tagName":"option","attributes":{"code":"000000_0036","value":"$100 deductible/Collision Deductible Waiver","unique_id":"106"},"text":"$100 deductible/Collision Deductible Waiver","children":[]},{"id":107,"tagName":"option","attributes":{"code":"000000_0004","value":"$150 deductible","unique_id":"107"},"text":"$150 deductible","children":[]},{"id":108,"tagName":"option","attributes":{"code":"000000_0037","value":"$150 deductible/Collision Deductible Waiver","unique_id":"108"},"text":"$150 deductible/Collision Deductible Waiver","children":[]},{"id":109,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"109"},"text":"$200 deductible","children":[]},{"id":110,"tagName":"option","attributes":{"code":"000000_0038","value":"$200 deductible/Collision Deductible Waiver","unique_id":"110"},"text":"$200 deductible/Collision Deductible Waiver","children":[]},{"id":111,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"111"},"text":"$250 deductible","children":[]},{"id":112,"tagName":"option","attributes":{"code":"000000_0039","value":"$250 deductible/Collision Deductible Waiver","unique_id":"112"},"text":"$250 deductible/Collision Deductible Waiver","children":[]},{"id":113,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"113"},"text":"$500 deductible","children":[]},{"id":114,"tagName":"option","attributes":{"code":"000000_0040","value":"$500 deductible/Collision Deductible Waiver","unique_id":"114"},"text":"$500 deductible/Collision Deductible Waiver","children":[]},{"id":115,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"115"},"text":"$1,000 deductible","children":[]},{"id":116,"tagName":"option","attributes":{"code":"000000_0051","value":"$1,000 deductible/Collision Deductible Waiver","unique_id":"116"},"text":"$1,000 deductible/Collision Deductible Waiver","children":[]},{"id":117,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"117"},"text":"$1,500 deductible","children":[]},{"id":118,"tagName":"option","attributes":{"code":"000000_0125","value":"$1,500 deductible/Collision Deductible Waiver","unique_id":"118"},"text":"$1,500 deductible/Collision Deductible Waiver","children":[]},{"id":119,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"119"},"text":"$2,000 deductible","children":[]},{"id":120,"tagName":"option","attributes":{"code":"000000_0083","value":"$2,000 deductible/Collision Deductible Waiver","unique_id":"120"},"text":"$2,000 deductible/Collision Deductible Waiver","children":[]},{"id":121,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"121"},"text":"$2,500 deductible","children":[]},{"id":122,"tagName":"option","attributes":{"code":"000000_0126","value":"$2,500 deductible/Collision Deductible Waiver","unique_id":"122"},"text":"$2,500 deductible/Collision Deductible Waiver","children":[]},{"id":123,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"123"},"text":"I decline","children":[]}]},{"id":124,"tagName":"label","attributes":{"for":"Id_17a76911-e965-4a57-a403-86cc66e99498_65373","id":"Id_17a76911-e965-4a57-a403-86cc66e99498_65373-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"124"},"text":"Uninsured Motorist Property Damage","children":[{"id":125,"tagName":"span","attributes":{"unique_id":"125"},"text":"Uninsured Motorist Property Damage","children":[]},{"id":126,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"126"},"text":"","children":[{"id":127,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_17a76911-e965-4a57-a403-86cc66e99498_65373-btn","class":"tooltip-trigger","data-tooltip-view":"Id_17a76911-e965-4a57-a403-86cc66e99498_65373-tooltip","aria-labelledby":"Id_17a76911-e965-4a57-a403-86cc66e99498_65373-label","tabindex":"-1","unique_id":"127"},"text":"","children":[{"id":128,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"128"},"text":"","children":[]}]}]}]},{"id":129,"tagName":"select","attributes":{"id":"Id_17a76911-e965-4a57-a403-86cc66e99498_65373","aria-invalid":"false","data-formotivid":"0012","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"129","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$3,500"}]},"text":"Please SelectI decline$3,500","children":[{"id":130,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"130"},"text":"I decline","children":[]},{"id":131,"tagName":"option","attributes":{"code":"003500_0000","value":"$3,500","unique_id":"131"},"text":"$3,500","children":[]}]},{"id":132,"tagName":"label","attributes":{"for":"Id_49ac54b6-c630-4fde-bf9d-024282e07a09_34004","id":"Id_49ac54b6-c630-4fde-bf9d-024282e07a09_34004-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"132"},"text":"Emergency Road Service (ERS)","children":[{"id":133,"tagName":"span","attributes":{"unique_id":"133"},"text":"Emergency Road Service (ERS)","children":[]},{"id":134,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"134"},"text":"","children":[{"id":135,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_49ac54b6-c630-4fde-bf9d-024282e07a09_34004-btn","class":"tooltip-trigger","data-tooltip-view":"Id_49ac54b6-c630-4fde-bf9d-024282e07a09_34004-tooltip","aria-labelledby":"Id_49ac54b6-c630-4fde-bf9d-024282e07a09_34004-label","tabindex":"-1","unique_id":"135"},"text":"","children":[{"id":136,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"136"},"text":"","children":[]}]}]}]},{"id":137,"tagName":"select","attributes":{"id":"Id_49ac54b6-c630-4fde-bf9d-024282e07a09_34004","aria-invalid":"false","data-formotivid":"0053","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"137","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"Liability Only Vehicle"},{"optionIndex":2,"text":"I accept this coverage"},{"optionIndex":3,"text":"I decline"}]},"text":"Please SelectLiability Only VehicleI accept this coverageI decline","children":[{"id":138,"tagName":"option","attributes":{"code":"000012_0000","value":"Liability Only Vehicle","unique_id":"138"},"text":"Liability Only Vehicle","children":[]},{"id":139,"tagName":"option","attributes":{"code":"000010_0000","value":"I accept this coverage","unique_id":"139"},"text":"I accept this coverage","children":[]},{"id":140,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"140"},"text":"I decline","children":[]}]},{"id":141,"tagName":"label","attributes":{"for":"Id_fb7dc53a-dfff-4873-9de0-0c85fb93d464_50383","id":"Id_fb7dc53a-dfff-4873-9de0-0c85fb93d464_50383-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"141"},"text":"Rental Reimbursement (RR)","children":[{"id":142,"tagName":"span","attributes":{"unique_id":"142"},"text":"Rental Reimbursement (RR)","children":[]},{"id":143,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"143"},"text":"","children":[{"id":144,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_fb7dc53a-dfff-4873-9de0-0c85fb93d464_50383-btn","class":"tooltip-trigger","data-tooltip-view":"Id_fb7dc53a-dfff-4873-9de0-0c85fb93d464_50383-tooltip","aria-labelledby":"Id_fb7dc53a-dfff-4873-9de0-0c85fb93d464_50383-label","tabindex":"-1","unique_id":"144"},"text":"","children":[{"id":145,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"145"},"text":"","children":[]}]}]}]},{"id":146,"tagName":"select","attributes":{"id":"Id_fb7dc53a-dfff-4873-9de0-0c85fb93d464_50383","aria-invalid":"false","data-formotivid":"0040","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"146","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$35/day, $1,050 max per claim"},{"optionIndex":3,"text":"$45/day, $1,350 max per claim"},{"optionIndex":4,"text":"$50/day, $1,500 max per claim"}]},"text":"Please SelectI decline$35/day, $1,050 max per claim$45/day, $1,350 max per claim$50/day, $1,500 max per claim","children":[{"id":147,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"147"},"text":"I decline","children":[]},{"id":148,"tagName":"option","attributes":{"code":"001050_0000","value":"$35/day, $1,050 max per claim","unique_id":"148"},"text":"$35/day, $1,050 max per claim","children":[]},{"id":149,"tagName":"option","attributes":{"code":"001350_0000","value":"$45/day, $1,350 max per claim","unique_id":"149"},"text":"$45/day, $1,350 max per claim","children":[]},{"id":150,"tagName":"option","attributes":{"code":"001500_0000","value":"$50/day, $1,500 max per claim","unique_id":"150"},"text":"$50/day, $1,500 max per claim","children":[]}]},{"id":151,"tagName":"label","attributes":{"for":"Id_7c1fda1e-0458-4569-ac3d-cdb6916006f9_74919","id":"Id_7c1fda1e-0458-4569-ac3d-cdb6916006f9_74919-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"151"},"text":"Mechanical Breakdown Insurance","children":[{"id":152,"tagName":"span","attributes":{"unique_id":"152"},"text":"Mechanical Breakdown Insurance","children":[]},{"id":153,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"153"},"text":"","children":[{"id":154,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_7c1fda1e-0458-4569-ac3d-cdb6916006f9_74919-btn","class":"tooltip-trigger","data-tooltip-view":"Id_7c1fda1e-0458-4569-ac3d-cdb6916006f9_74919-tooltip","aria-labelledby":"Id_7c1fda1e-0458-4569-ac3d-cdb6916006f9_74919-label","tabindex":"-1","unique_id":"154"},"text":"","children":[{"id":155,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"155"},"text":"","children":[]}]}]}]},{"id":156,"tagName":"select","attributes":{"id":"Id_7c1fda1e-0458-4569-ac3d-cdb6916006f9_74919","aria-invalid":"false","data-formotivid":"0098","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"156","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$250 deductible"},{"optionIndex":2,"text":"I decline"}]},"text":"Please Select$250 deductibleI decline","children":[{"id":157,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"157"},"text":"$250 deductible","children":[]},{"id":158,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"158"},"text":"I decline","children":[]}]},{"id":159,"tagName":"label","attributes":{"for":"Id_c745b427-9dbb-4331-9f0d-3de13d5d5636_25008","id":"Id_c745b427-9dbb-4331-9f0d-3de13d5d5636_25008-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"159"},"text":"Comprehensive (Excluding Collision)","children":[{"id":160,"tagName":"span","attributes":{"unique_id":"160"},"text":"Comprehensive (Excluding Collision)","children":[]},{"id":161,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"161"},"text":"","children":[{"id":162,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_c745b427-9dbb-4331-9f0d-3de13d5d5636_25008-btn","class":"tooltip-trigger","data-tooltip-view":"Id_c745b427-9dbb-4331-9f0d-3de13d5d5636_25008-tooltip","aria-labelledby":"Id_c745b427-9dbb-4331-9f0d-3de13d5d5636_25008-label","tabindex":"-1","unique_id":"162"},"text":"","children":[{"id":163,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"163"},"text":"","children":[]}]}]}]},{"id":164,"tagName":"select","attributes":{"id":"Id_c745b427-9dbb-4331-9f0d-3de13d5d5636_25008","aria-invalid":"false","data-formotivid":"0005","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"164","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"No deductible"},{"optionIndex":2,"text":"$50 deductible"},{"optionIndex":3,"text":"$100 deductible"},{"optionIndex":4,"text":"$200 deductible"},{"optionIndex":5,"text":"$250 deductible"},{"optionIndex":6,"text":"$500 deductible"},{"optionIndex":7,"text":"$1,000 deductible"},{"optionIndex":8,"text":"$1,500 deductible"},{"optionIndex":9,"text":"$2,000 deductible"},{"optionIndex":10,"text":"$2,500 deductible"},{"optionIndex":11,"text":"I decline"}]},"text":"Please SelectNo deductible$50 deductible$100 deductible$200 deductible$250 deductible$500 deductible$1,000 deductible$1,500 deductible$2,000 deductible$2,500 deductibleI decline","children":[{"id":165,"tagName":"option","attributes":{"code":"000000_0000","value":"No deductible","unique_id":"165"},"text":"No deductible","children":[]},{"id":166,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"166"},"text":"$50 deductible","children":[]},{"id":167,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"167"},"text":"$100 deductible","children":[]},{"id":168,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"168"},"text":"$200 deductible","children":[]},{"id":169,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"169"},"text":"$250 deductible","children":[]},{"id":170,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"170"},"text":"$500 deductible","children":[]},{"id":171,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"171"},"text":"$1,000 deductible","children":[]},{"id":172,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"172"},"text":"$1,500 deductible","children":[]},{"id":173,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"173"},"text":"$2,000 deductible","children":[]},{"id":174,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"174"},"text":"$2,500 deductible","children":[]},{"id":175,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"175"},"text":"I decline","children":[]}]},{"id":176,"tagName":"label","attributes":{"for":"Id_81576c12-9689-4ec5-ba2d-df17fa46e95c_11112","id":"Id_81576c12-9689-4ec5-ba2d-df17fa46e95c_11112-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"176"},"text":"Collision (COLL)","children":[{"id":177,"tagName":"span","attributes":{"unique_id":"177"},"text":"Collision (COLL)","children":[]},{"id":178,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"178"},"text":"","children":[{"id":179,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_81576c12-9689-4ec5-ba2d-df17fa46e95c_11112-btn","class":"tooltip-trigger","data-tooltip-view":"Id_81576c12-9689-4ec5-ba2d-df17fa46e95c_11112-tooltip","aria-labelledby":"Id_81576c12-9689-4ec5-ba2d-df17fa46e95c_11112-label","tabindex":"-1","unique_id":"179"},"text":"","children":[{"id":180,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"180"},"text":"","children":[]}]}]}]},{"id":181,"tagName":"select","attributes":{"id":"Id_81576c12-9689-4ec5-ba2d-df17fa46e95c_11112","aria-invalid":"false","data-formotivid":"0007","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"181","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$25 deductible"},{"optionIndex":2,"text":"$25 deductible/Collision Deductible Waiver"},{"optionIndex":3,"text":"$50 deductible"},{"optionIndex":4,"text":"$50 deductible/Collision Deductible Waiver"},{"optionIndex":5,"text":"$100 deductible"},{"optionIndex":6,"text":"$100 deductible/Collision Deductible Waiver"},{"optionIndex":7,"text":"$150 deductible"},{"optionIndex":8,"text":"$150 deductible/Collision Deductible Waiver"},{"optionIndex":9,"text":"$200 deductible"},{"optionIndex":10,"text":"$200 deductible/Collision Deductible Waiver"},{"optionIndex":11,"text":"$250 deductible"},{"optionIndex":12,"text":"$250 deductible/Collision Deductible Waiver"},{"optionIndex":13,"text":"$500 deductible"},{"optionIndex":14,"text":"$500 deductible/Collision Deductible Waiver"},{"optionIndex":15,"text":"$1,000 deductible"},{"optionIndex":16,"text":"$1,000 deductible/Collision Deductible Waiver"},{"optionIndex":17,"text":"$1,500 deductible"},{"optionIndex":18,"text":"$1,500 deductible/Collision Deductible Waiver"},{"optionIndex":19,"text":"$2,000 deductible"},{"optionIndex":20,"text":"$2,000 deductible/Collision Deductible Waiver"},{"optionIndex":21,"text":"$2,500 deductible"},{"optionIndex":22,"text":"$2,500 deductible/Collision Deductible Waiver"},{"optionIndex":23,"text":"I decline"}]},"text":"Please Select$25 deductible$25 deductible/Collision Deductible Waiver$50 deductible$50 deductible/Collision Deductible Waiver$100 deductible$100 deductible/Collision Deductible Waiver$150 deductible$150 deductible/Collision Deductible Waiver$200 deductible$200 deductible/Collision Deductible Waiver$250 deductible$250 deductible/Collision Deductible Waiver$500 deductible$500 deductible/Collision Deductible Waiver$1,000 deductible$1,000 deductible/Collision Deductible Waiver$1,500 deductible$1,500 deductible/Collision Deductible Waiver$2,000 deductible$2,000 deductible/Collision Deductible Waiver$2,500 deductible$2,500 deductible/Collision Deductible WaiverI decline","children":[{"id":182,"tagName":"option","attributes":{"code":"000000_0001","value":"$25 deductible","unique_id":"182"},"text":"$25 deductible","children":[]},{"id":183,"tagName":"option","attributes":{"code":"000000_0034","value":"$25 deductible/Collision Deductible Waiver","unique_id":"183"},"text":"$25 deductible/Collision Deductible Waiver","children":[]},{"id":184,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"184"},"text":"$50 deductible","children":[]},{"id":185,"tagName":"option","attributes":{"code":"000000_0035","value":"$50 deductible/Collision Deductible Waiver","unique_id":"185"},"text":"$50 deductible/Collision Deductible Waiver","children":[]},{"id":186,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"186"},"text":"$100 deductible","children":[]},{"id":187,"tagName":"option","attributes":{"code":"000000_0036","value":"$100 deductible/Collision Deductible Waiver","unique_id":"187"},"text":"$100 deductible/Collision Deductible Waiver","children":[]},{"id":188,"tagName":"option","attributes":{"code":"000000_0004","value":"$150 deductible","unique_id":"188"},"text":"$150 deductible","children":[]},{"id":189,"tagName":"option","attributes":{"code":"000000_0037","value":"$150 deductible/Collision Deductible Waiver","unique_id":"189"},"text":"$150 deductible/Collision Deductible Waiver","children":[]},{"id":190,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"190"},"text":"$200 deductible","children":[]},{"id":191,"tagName":"option","attributes":{"code":"000000_0038","value":"$200 deductible/Collision Deductible Waiver","unique_id":"191"},"text":"$200 deductible/Collision Deductible Waiver","children":[]},{"id":192,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"192"},"text":"$250 deductible","children":[]},{"id":193,"tagName":"option","attributes":{"code":"000000_0039","value":"$250 deductible/Collision Deductible Waiver","unique_id":"193"},"text":"$250 deductible/Collision Deductible Waiver","children":[]},{"id":194,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"194"},"text":"$500 deductible","children":[]},{"id":195,"tagName":"option","attributes":{"code":"000000_0040","value":"$500 deductible/Collision Deductible Waiver","unique_id":"195"},"text":"$500 deductible/Collision Deductible Waiver","children":[]},{"id":196,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"196"},"text":"$1,000 deductible","children":[]},{"id":197,"tagName":"option","attributes":{"code":"000000_0051","value":"$1,000 deductible/Collision Deductible Waiver","unique_id":"197"},"text":"$1,000 deductible/Collision Deductible Waiver","children":[]},{"id":198,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"198"},"text":"$1,500 deductible","children":[]},{"id":199,"tagName":"option","attributes":{"code":"000000_0125","value":"$1,500 deductible/Collision Deductible Waiver","unique_id":"199"},"text":"$1,500 deductible/Collision Deductible Waiver","children":[]},{"id":200,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"200"},"text":"$2,000 deductible","children":[]},{"id":201,"tagName":"option","attributes":{"code":"000000_0083","value":"$2,000 deductible/Collision Deductible Waiver","unique_id":"201"},"text":"$2,000 deductible/Collision Deductible Waiver","children":[]},{"id":202,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"202"},"text":"$2,500 deductible","children":[]},{"id":203,"tagName":"option","attributes":{"code":"000000_0126","value":"$2,500 deductible/Collision Deductible Waiver","unique_id":"203"},"text":"$2,500 deductible/Collision Deductible Waiver","children":[]},{"id":204,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"204"},"text":"I decline","children":[]}]},{"id":205,"tagName":"label","attributes":{"for":"Id_5f259e0b-e9e1-4300-af3d-f21fd9d75aae_91068","id":"Id_5f259e0b-e9e1-4300-af3d-f21fd9d75aae_91068-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"205"},"text":"Uninsured Motorist Property Damage","children":[{"id":206,"tagName":"span","attributes":{"unique_id":"206"},"text":"Uninsured Motorist Property Damage","children":[]},{"id":207,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"207"},"text":"","children":[{"id":208,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_5f259e0b-e9e1-4300-af3d-f21fd9d75aae_91068-btn","class":"tooltip-trigger","data-tooltip-view":"Id_5f259e0b-e9e1-4300-af3d-f21fd9d75aae_91068-tooltip","aria-labelledby":"Id_5f259e0b-e9e1-4300-af3d-f21fd9d75aae_91068-label","tabindex":"-1","unique_id":"208"},"text":"","children":[{"id":209,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"209"},"text":"","children":[]}]}]}]},{"id":210,"tagName":"select","attributes":{"id":"Id_5f259e0b-e9e1-4300-af3d-f21fd9d75aae_91068","aria-invalid":"false","data-formotivid":"0012","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"210","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$3,500"}]},"text":"Please SelectI decline$3,500","children":[{"id":211,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"211"},"text":"I decline","children":[]},{"id":212,"tagName":"option","attributes":{"code":"003500_0000","value":"$3,500","unique_id":"212"},"text":"$3,500","children":[]}]},{"id":213,"tagName":"label","attributes":{"for":"Id_1f7b08cc-f199-4a44-8a90-8136bd3eab7b_53830","id":"Id_1f7b08cc-f199-4a44-8a90-8136bd3eab7b_53830-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"213"},"text":"Emergency Road Service (ERS)","children":[{"id":214,"tagName":"span","attributes":{"unique_id":"214"},"text":"Emergency Road Service (ERS)","children":[]},{"id":215,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"215"},"text":"","children":[{"id":216,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_1f7b08cc-f199-4a44-8a90-8136bd3eab7b_53830-btn","class":"tooltip-trigger","data-tooltip-view":"Id_1f7b08cc-f199-4a44-8a90-8136bd3eab7b_53830-tooltip","aria-labelledby":"Id_1f7b08cc-f199-4a44-8a90-8136bd3eab7b_53830-label","tabindex":"-1","unique_id":"216"},"text":"","children":[{"id":217,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"217"},"text":"","children":[]}]}]}]},{"id":218,"tagName":"select","attributes":{"id":"Id_1f7b08cc-f199-4a44-8a90-8136bd3eab7b_53830","aria-invalid":"false","data-formotivid":"0053","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"218","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"Liability Only Vehicle"},{"optionIndex":2,"text":"I accept this coverage"},{"optionIndex":3,"text":"I decline"}]},"text":"Please SelectLiability Only VehicleI accept this coverageI decline","children":[{"id":219,"tagName":"option","attributes":{"code":"000012_0000","value":"Liability Only Vehicle","unique_id":"219"},"text":"Liability Only Vehicle","children":[]},{"id":220,"tagName":"option","attributes":{"code":"000010_0000","value":"I accept this coverage","unique_id":"220"},"text":"I accept this coverage","children":[]},{"id":221,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"221"},"text":"I decline","children":[]}]},{"id":222,"tagName":"label","attributes":{"for":"Id_c5f25c44-1002-427e-ba07-17b77d2b4ee3_48150","id":"Id_c5f25c44-1002-427e-ba07-17b77d2b4ee3_48150-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"222"},"text":"Rental Reimbursement (RR)","children":[{"id":223,"tagName":"span","attributes":{"unique_id":"223"},"text":"Rental Reimbursement (RR)","children":[]},{"id":224,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"224"},"text":"","children":[{"id":225,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_c5f25c44-1002-427e-ba07-17b77d2b4ee3_48150-btn","class":"tooltip-trigger","data-tooltip-view":"Id_c5f25c44-1002-427e-ba07-17b77d2b4ee3_48150-tooltip","aria-labelledby":"Id_c5f25c44-1002-427e-ba07-17b77d2b4ee3_48150-label","tabindex":"-1","unique_id":"225"},"text":"","children":[{"id":226,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"226"},"text":"","children":[]}]}]}]},{"id":227,"tagName":"select","attributes":{"id":"Id_c5f25c44-1002-427e-ba07-17b77d2b4ee3_48150","aria-invalid":"false","data-formotivid":"0040","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"227","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$35/day, $1,050 max per claim"},{"optionIndex":3,"text":"$45/day, $1,350 max per claim"},{"optionIndex":4,"text":"$50/day, $1,500 max per claim"}]},"text":"Please SelectI decline$35/day, $1,050 max per claim$45/day, $1,350 max per claim$50/day, $1,500 max per claim","children":[{"id":228,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"228"},"text":"I decline","children":[]},{"id":229,"tagName":"option","attributes":{"code":"001050_0000","value":"$35/day, $1,050 max per claim","unique_id":"229"},"text":"$35/day, $1,050 max per claim","children":[]},{"id":230,"tagName":"option","attributes":{"code":"001350_0000","value":"$45/day, $1,350 max per claim","unique_id":"230"},"text":"$45/day, $1,350 max per claim","children":[]},{"id":231,"tagName":"option","attributes":{"code":"001500_0000","value":"$50/day, $1,500 max per claim","unique_id":"231"},"text":"$50/day, $1,500 max per claim","children":[]}]},{"id":232,"tagName":"label","attributes":{"for":"Id_a260d964-662b-46b6-88b7-1fb61d1a6e9c_72439","id":"Id_a260d964-662b-46b6-88b7-1fb61d1a6e9c_72439-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"232"},"text":"Comprehensive (Excluding Collision)","children":[{"id":233,"tagName":"span","attributes":{"unique_id":"233"},"text":"Comprehensive (Excluding Collision)","children":[]},{"id":234,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"234"},"text":"","children":[{"id":235,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_a260d964-662b-46b6-88b7-1fb61d1a6e9c_72439-btn","class":"tooltip-trigger","data-tooltip-view":"Id_a260d964-662b-46b6-88b7-1fb61d1a6e9c_72439-tooltip","aria-labelledby":"Id_a260d964-662b-46b6-88b7-1fb61d1a6e9c_72439-label","tabindex":"-1","unique_id":"235"},"text":"","children":[{"id":236,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"236"},"text":"","children":[]}]}]}]},{"id":237,"tagName":"select","attributes":{"id":"Id_a260d964-662b-46b6-88b7-1fb61d1a6e9c_72439","aria-invalid":"false","data-formotivid":"0005","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"237","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"No deductible"},{"optionIndex":2,"text":"$50 deductible"},{"optionIndex":3,"text":"$100 deductible"},{"optionIndex":4,"text":"$200 deductible"},{"optionIndex":5,"text":"$250 deductible"},{"optionIndex":6,"text":"$500 deductible"},{"optionIndex":7,"text":"$1,000 deductible"},{"optionIndex":8,"text":"$1,500 deductible"},{"optionIndex":9,"text":"$2,000 deductible"},{"optionIndex":10,"text":"$2,500 deductible"},{"optionIndex":11,"text":"I decline"}]},"text":"Please SelectNo deductible$50 deductible$100 deductible$200 deductible$250 deductible$500 deductible$1,000 deductible$1,500 deductible$2,000 deductible$2,500 deductibleI decline","children":[{"id":238,"tagName":"option","attributes":{"code":"000000_0000","value":"No deductible","unique_id":"238"},"text":"No deductible","children":[]},{"id":239,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"239"},"text":"$50 deductible","children":[]},{"id":240,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"240"},"text":"$100 deductible","children":[]},{"id":241,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"241"},"text":"$200 deductible","children":[]},{"id":242,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"242"},"text":"$250 deductible","children":[]},{"id":243,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"243"},"text":"$500 deductible","children":[]},{"id":244,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"244"},"text":"$1,000 deductible","children":[]},{"id":245,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"245"},"text":"$1,500 deductible","children":[]},{"id":246,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"246"},"text":"$2,000 deductible","children":[]},{"id":247,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"247"},"text":"$2,500 deductible","children":[]},{"id":248,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"248"},"text":"I decline","children":[]}]},{"id":249,"tagName":"label","attributes":{"for":"Id_8d5841ba-2d69-47cb-bcb5-1bb9a1c8da54_31784","id":"Id_8d5841ba-2d69-47cb-bcb5-1bb9a1c8da54_31784-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"249"},"text":"Collision (COLL)","children":[{"id":250,"tagName":"span","attributes":{"unique_id":"250"},"text":"Collision (COLL)","children":[]},{"id":251,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"251"},"text":"","children":[{"id":252,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_8d5841ba-2d69-47cb-bcb5-1bb9a1c8da54_31784-btn","class":"tooltip-trigger","data-tooltip-view":"Id_8d5841ba-2d69-47cb-bcb5-1bb9a1c8da54_31784-tooltip","aria-labelledby":"Id_8d5841ba-2d69-47cb-bcb5-1bb9a1c8da54_31784-label","tabindex":"-1","unique_id":"252"},"text":"","children":[{"id":253,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"253"},"text":"","children":[]}]}]}]},{"id":254,"tagName":"select","attributes":{"id":"Id_8d5841ba-2d69-47cb-bcb5-1bb9a1c8da54_31784","aria-invalid":"false","data-formotivid":"0007","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"254","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$25 deductible"},{"optionIndex":2,"text":"$25 deductible/Collision Deductible Waiver"},{"optionIndex":3,"text":"$50 deductible"},{"optionIndex":4,"text":"$50 deductible/Collision Deductible Waiver"},{"optionIndex":5,"text":"$100 deductible"},{"optionIndex":6,"text":"$100 deductible/Collision Deductible Waiver"},{"optionIndex":7,"text":"$150 deductible"},{"optionIndex":8,"text":"$150 deductible/Collision Deductible Waiver"},{"optionIndex":9,"text":"$200 deductible"},{"optionIndex":10,"text":"$200 deductible/Collision Deductible Waiver"},{"optionIndex":11,"text":"$250 deductible"},{"optionIndex":12,"text":"$250 deductible/Collision Deductible Waiver"},{"optionIndex":13,"text":"$500 deductible"},{"optionIndex":14,"text":"$500 deductible/Collision Deductible Waiver"},{"optionIndex":15,"text":"$1,000 deductible"},{"optionIndex":16,"text":"$1,000 deductible/Collision Deductible Waiver"},{"optionIndex":17,"text":"$1,500 deductible"},{"optionIndex":18,"text":"$1,500 deductible/Collision Deductible Waiver"},{"optionIndex":19,"text":"$2,000 deductible"},{"optionIndex":20,"text":"$2,000 deductible/Collision Deductible Waiver"},{"optionIndex":21,"text":"$2,500 deductible"},{"optionIndex":22,"text":"$2,500 deductible/Collision Deductible Waiver"},{"optionIndex":23,"text":"I decline"}]},"text":"Please Select$25 deductible$25 deductible/Collision Deductible Waiver$50 deductible$50 deductible/Collision Deductible Waiver$100 deductible$100 deductible/Collision Deductible Waiver$150 deductible$150 deductible/Collision Deductible Waiver$200 deductible$200 deductible/Collision Deductible Waiver$250 deductible$250 deductible/Collision Deductible Waiver$500 deductible$500 deductible/Collision Deductible Waiver$1,000 deductible$1,000 deductible/Collision Deductible Waiver$1,500 deductible$1,500 deductible/Collision Deductible Waiver$2,000 deductible$2,000 deductible/Collision Deductible Waiver$2,500 deductible$2,500 deductible/Collision Deductible WaiverI decline","children":[{"id":255,"tagName":"option","attributes":{"code":"000000_0001","value":"$25 deductible","unique_id":"255"},"text":"$25 deductible","children":[]},{"id":256,"tagName":"option","attributes":{"code":"000000_0034","value":"$25 deductible/Collision Deductible Waiver","unique_id":"256"},"text":"$25 deductible/Collision Deductible Waiver","children":[]},{"id":257,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"257"},"text":"$50 deductible","children":[]},{"id":258,"tagName":"option","attributes":{"code":"000000_0035","value":"$50 deductible/Collision Deductible Waiver","unique_id":"258"},"text":"$50 deductible/Collision Deductible Waiver","children":[]},{"id":259,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"259"},"text":"$100 deductible","children":[]},{"id":260,"tagName":"option","attributes":{"code":"000000_0036","value":"$100 deductible/Collision Deductible Waiver","unique_id":"260"},"text":"$100 deductible/Collision Deductible Waiver","children":[]},{"id":261,"tagName":"option","attributes":{"code":"000000_0004","value":"$150 deductible","unique_id":"261"},"text":"$150 deductible","children":[]},{"id":262,"tagName":"option","attributes":{"code":"000000_0037","value":"$150 deductible/Collision Deductible Waiver","unique_id":"262"},"text":"$150 deductible/Collision Deductible Waiver","children":[]},{"id":263,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"263"},"text":"$200 deductible","children":[]},{"id":264,"tagName":"option","attributes":{"code":"000000_0038","value":"$200 deductible/Collision Deductible Waiver","unique_id":"264"},"text":"$200 deductible/Collision Deductible Waiver","children":[]},{"id":265,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"265"},"text":"$250 deductible","children":[]},{"id":266,"tagName":"option","attributes":{"code":"000000_0039","value":"$250 deductible/Collision Deductible Waiver","unique_id":"266"},"text":"$250 deductible/Collision Deductible Waiver","children":[]},{"id":267,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"267"},"text":"$500 deductible","children":[]},{"id":268,"tagName":"option","attributes":{"code":"000000_0040","value":"$500 deductible/Collision Deductible Waiver","unique_id":"268"},"text":"$500 deductible/Collision Deductible Waiver","children":[]},{"id":269,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"269"},"text":"$1,000 deductible","children":[]},{"id":270,"tagName":"option","attributes":{"code":"000000_0051","value":"$1,000 deductible/Collision Deductible Waiver","unique_id":"270"},"text":"$1,000 deductible/Collision Deductible Waiver","children":[]},{"id":271,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"271"},"text":"$1,500 deductible","children":[]},{"id":272,"tagName":"option","attributes":{"code":"000000_0125","value":"$1,500 deductible/Collision Deductible Waiver","unique_id":"272"},"text":"$1,500 deductible/Collision Deductible Waiver","children":[]},{"id":273,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"273"},"text":"$2,000 deductible","children":[]},{"id":274,"tagName":"option","attributes":{"code":"000000_0083","value":"$2,000 deductible/Collision Deductible Waiver","unique_id":"274"},"text":"$2,000 deductible/Collision Deductible Waiver","children":[]},{"id":275,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"275"},"text":"$2,500 deductible","children":[]},{"id":276,"tagName":"option","attributes":{"code":"000000_0126","value":"$2,500 deductible/Collision Deductible Waiver","unique_id":"276"},"text":"$2,500 deductible/Collision Deductible Waiver","children":[]},{"id":277,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"277"},"text":"I decline","children":[]}]},{"id":278,"tagName":"label","attributes":{"for":"Id_4adaee68-3f86-4efd-a47f-16d38d14d824_68732","id":"Id_4adaee68-3f86-4efd-a47f-16d38d14d824_68732-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"278"},"text":"Uninsured Motorist Property Damage","children":[{"id":279,"tagName":"span","attributes":{"unique_id":"279"},"text":"Uninsured Motorist Property Damage","children":[]},{"id":280,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"280"},"text":"","children":[{"id":281,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_4adaee68-3f86-4efd-a47f-16d38d14d824_68732-btn","class":"tooltip-trigger","data-tooltip-view":"Id_4adaee68-3f86-4efd-a47f-16d38d14d824_68732-tooltip","aria-labelledby":"Id_4adaee68-3f86-4efd-a47f-16d38d14d824_68732-label","tabindex":"-1","unique_id":"281"},"text":"","children":[{"id":282,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"282"},"text":"","children":[]}]}]}]},{"id":283,"tagName":"select","attributes":{"id":"Id_4adaee68-3f86-4efd-a47f-16d38d14d824_68732","aria-invalid":"false","data-formotivid":"0012","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"283","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$3,500"}]},"text":"Please SelectI decline$3,500","children":[{"id":284,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"284"},"text":"I decline","children":[]},{"id":285,"tagName":"option","attributes":{"code":"003500_0000","value":"$3,500","unique_id":"285"},"text":"$3,500","children":[]}]},{"id":286,"tagName":"label","attributes":{"for":"Id_294931c3-cb63-4d5b-b19d-80ab726d0255_68225","id":"Id_294931c3-cb63-4d5b-b19d-80ab726d0255_68225-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"286"},"text":"Emergency Road Service (ERS)","children":[{"id":287,"tagName":"span","attributes":{"unique_id":"287"},"text":"Emergency Road Service (ERS)","children":[]},{"id":288,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"288"},"text":"","children":[{"id":289,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_294931c3-cb63-4d5b-b19d-80ab726d0255_68225-btn","class":"tooltip-trigger","data-tooltip-view":"Id_294931c3-cb63-4d5b-b19d-80ab726d0255_68225-tooltip","aria-labelledby":"Id_294931c3-cb63-4d5b-b19d-80ab726d0255_68225-label","tabindex":"-1","unique_id":"289"},"text":"","children":[{"id":290,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"290"},"text":"","children":[]}]}]}]},{"id":291,"tagName":"select","attributes":{"id":"Id_294931c3-cb63-4d5b-b19d-80ab726d0255_68225","aria-invalid":"false","data-formotivid":"0053","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"291","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"Liability Only Vehicle"},{"optionIndex":2,"text":"I accept this coverage"},{"optionIndex":3,"text":"I decline"}]},"text":"Please SelectLiability Only VehicleI accept this coverageI decline","children":[{"id":292,"tagName":"option","attributes":{"code":"000012_0000","value":"Liability Only Vehicle","unique_id":"292"},"text":"Liability Only Vehicle","children":[]},{"id":293,"tagName":"option","attributes":{"code":"000010_0000","value":"I accept this coverage","unique_id":"293"},"text":"I accept this coverage","children":[]},{"id":294,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"294"},"text":"I decline","children":[]}]},{"id":295,"tagName":"label","attributes":{"for":"Id_3bd55dda-a4f3-4004-bfbb-a26c2b2cc9b8_75530","id":"Id_3bd55dda-a4f3-4004-bfbb-a26c2b2cc9b8_75530-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"295"},"text":"Rental Reimbursement (RR)","children":[{"id":296,"tagName":"span","attributes":{"unique_id":"296"},"text":"Rental Reimbursement (RR)","children":[]},{"id":297,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"297"},"text":"","children":[{"id":298,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_3bd55dda-a4f3-4004-bfbb-a26c2b2cc9b8_75530-btn","class":"tooltip-trigger","data-tooltip-view":"Id_3bd55dda-a4f3-4004-bfbb-a26c2b2cc9b8_75530-tooltip","aria-labelledby":"Id_3bd55dda-a4f3-4004-bfbb-a26c2b2cc9b8_75530-label","tabindex":"-1","unique_id":"298"},"text":"","children":[{"id":299,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"299"},"text":"","children":[]}]}]}]},{"id":300,"tagName":"select","attributes":{"id":"Id_3bd55dda-a4f3-4004-bfbb-a26c2b2cc9b8_75530","aria-invalid":"false","data-formotivid":"0040","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"300","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$35/day, $1,050 max per claim"},{"optionIndex":3,"text":"$45/day, $1,350 max per claim"},{"optionIndex":4,"text":"$50/day, $1,500 max per claim"}]},"text":"Please SelectI decline$35/day, $1,050 max per claim$45/day, $1,350 max per claim$50/day, $1,500 max per claim","children":[{"id":301,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"301"},"text":"I decline","children":[]},{"id":302,"tagName":"option","attributes":{"code":"001050_0000","value":"$35/day, $1,050 max per claim","unique_id":"302"},"text":"$35/day, $1,050 max per claim","children":[]},{"id":303,"tagName":"option","attributes":{"code":"001350_0000","value":"$45/day, $1,350 max per claim","unique_id":"303"},"text":"$45/day, $1,350 max per claim","children":[]},{"id":304,"tagName":"option","attributes":{"code":"001500_0000","value":"$50/day, $1,500 max per claim","unique_id":"304"},"text":"$50/day, $1,500 max per claim","children":[]}]},{"id":305,"tagName":"label","attributes":{"for":"Id_abf889a6-b858-4b70-a573-07bc6ff73e76_46350","id":"Id_abf889a6-b858-4b70-a573-07bc6ff73e76_46350-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"305"},"text":"Comprehensive (Excluding Collision)","children":[{"id":306,"tagName":"span","attributes":{"unique_id":"306"},"text":"Comprehensive (Excluding Collision)","children":[]},{"id":307,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"307"},"text":"","children":[{"id":308,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_abf889a6-b858-4b70-a573-07bc6ff73e76_46350-btn","class":"tooltip-trigger","data-tooltip-view":"Id_abf889a6-b858-4b70-a573-07bc6ff73e76_46350-tooltip","aria-labelledby":"Id_abf889a6-b858-4b70-a573-07bc6ff73e76_46350-label","tabindex":"-1","unique_id":"308"},"text":"","children":[{"id":309,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"309"},"text":"","children":[]}]}]}]},{"id":310,"tagName":"select","attributes":{"id":"Id_abf889a6-b858-4b70-a573-07bc6ff73e76_46350","aria-invalid":"false","data-formotivid":"0005","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"310","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"No deductible"},{"optionIndex":2,"text":"$50 deductible"},{"optionIndex":3,"text":"$100 deductible"},{"optionIndex":4,"text":"$200 deductible"},{"optionIndex":5,"text":"$250 deductible"},{"optionIndex":6,"text":"$500 deductible"},{"optionIndex":7,"text":"$1,000 deductible"},{"optionIndex":8,"text":"$1,500 deductible"},{"optionIndex":9,"text":"$2,000 deductible"},{"optionIndex":10,"text":"$2,500 deductible"},{"optionIndex":11,"text":"I decline"}]},"text":"Please SelectNo deductible$50 deductible$100 deductible$200 deductible$250 deductible$500 deductible$1,000 deductible$1,500 deductible$2,000 deductible$2,500 deductibleI decline","children":[{"id":311,"tagName":"option","attributes":{"code":"000000_0000","value":"No deductible","unique_id":"311"},"text":"No deductible","children":[]},{"id":312,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"312"},"text":"$50 deductible","children":[]},{"id":313,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"313"},"text":"$100 deductible","children":[]},{"id":314,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"314"},"text":"$200 deductible","children":[]},{"id":315,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"315"},"text":"$250 deductible","children":[]},{"id":316,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"316"},"text":"$500 deductible","children":[]},{"id":317,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"317"},"text":"$1,000 deductible","children":[]},{"id":318,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"318"},"text":"$1,500 deductible","children":[]},{"id":319,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"319"},"text":"$2,000 deductible","children":[]},{"id":320,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"320"},"text":"$2,500 deductible","children":[]},{"id":321,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"321"},"text":"I decline","children":[]}]},{"id":322,"tagName":"label","attributes":{"for":"Id_23b13c60-3ed0-4db2-bf80-4a7cdcbd4d8e_65359","id":"Id_23b13c60-3ed0-4db2-bf80-4a7cdcbd4d8e_65359-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"322"},"text":"Collision (COLL)","children":[{"id":323,"tagName":"span","attributes":{"unique_id":"323"},"text":"Collision (COLL)","children":[]},{"id":324,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"324"},"text":"","children":[{"id":325,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_23b13c60-3ed0-4db2-bf80-4a7cdcbd4d8e_65359-btn","class":"tooltip-trigger","data-tooltip-view":"Id_23b13c60-3ed0-4db2-bf80-4a7cdcbd4d8e_65359-tooltip","aria-labelledby":"Id_23b13c60-3ed0-4db2-bf80-4a7cdcbd4d8e_65359-label","tabindex":"-1","unique_id":"325"},"text":"","children":[{"id":326,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"326"},"text":"","children":[]}]}]}]},{"id":327,"tagName":"select","attributes":{"id":"Id_23b13c60-3ed0-4db2-bf80-4a7cdcbd4d8e_65359","aria-invalid":"false","data-formotivid":"0007","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"327","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"$25 deductible"},{"optionIndex":2,"text":"$25 deductible/Collision Deductible Waiver"},{"optionIndex":3,"text":"$50 deductible"},{"optionIndex":4,"text":"$50 deductible/Collision Deductible Waiver"},{"optionIndex":5,"text":"$100 deductible"},{"optionIndex":6,"text":"$100 deductible/Collision Deductible Waiver"},{"optionIndex":7,"text":"$150 deductible"},{"optionIndex":8,"text":"$150 deductible/Collision Deductible Waiver"},{"optionIndex":9,"text":"$200 deductible"},{"optionIndex":10,"text":"$200 deductible/Collision Deductible Waiver"},{"optionIndex":11,"text":"$250 deductible"},{"optionIndex":12,"text":"$250 deductible/Collision Deductible Waiver"},{"optionIndex":13,"text":"$500 deductible"},{"optionIndex":14,"text":"$500 deductible/Collision Deductible Waiver"},{"optionIndex":15,"text":"$1,000 deductible"},{"optionIndex":16,"text":"$1,000 deductible/Collision Deductible Waiver"},{"optionIndex":17,"text":"$1,500 deductible"},{"optionIndex":18,"text":"$1,500 deductible/Collision Deductible Waiver"},{"optionIndex":19,"text":"$2,000 deductible"},{"optionIndex":20,"text":"$2,000 deductible/Collision Deductible Waiver"},{"optionIndex":21,"text":"$2,500 deductible"},{"optionIndex":22,"text":"$2,500 deductible/Collision Deductible Waiver"},{"optionIndex":23,"text":"I decline"}]},"text":"Please Select$25 deductible$25 deductible/Collision Deductible Waiver$50 deductible$50 deductible/Collision Deductible Waiver$100 deductible$100 deductible/Collision Deductible Waiver$150 deductible$150 deductible/Collision Deductible Waiver$200 deductible$200 deductible/Collision Deductible Waiver$250 deductible$250 deductible/Collision Deductible Waiver$500 deductible$500 deductible/Collision Deductible Waiver$1,000 deductible$1,000 deductible/Collision Deductible Waiver$1,500 deductible$1,500 deductible/Collision Deductible Waiver$2,000 deductible$2,000 deductible/Collision Deductible Waiver$2,500 deductible$2,500 deductible/Collision Deductible WaiverI decline","children":[{"id":328,"tagName":"option","attributes":{"code":"000000_0001","value":"$25 deductible","unique_id":"328"},"text":"$25 deductible","children":[]},{"id":329,"tagName":"option","attributes":{"code":"000000_0034","value":"$25 deductible/Collision Deductible Waiver","unique_id":"329"},"text":"$25 deductible/Collision Deductible Waiver","children":[]},{"id":330,"tagName":"option","attributes":{"code":"000000_0002","value":"$50 deductible","unique_id":"330"},"text":"$50 deductible","children":[]},{"id":331,"tagName":"option","attributes":{"code":"000000_0035","value":"$50 deductible/Collision Deductible Waiver","unique_id":"331"},"text":"$50 deductible/Collision Deductible Waiver","children":[]},{"id":332,"tagName":"option","attributes":{"code":"000000_0003","value":"$100 deductible","unique_id":"332"},"text":"$100 deductible","children":[]},{"id":333,"tagName":"option","attributes":{"code":"000000_0036","value":"$100 deductible/Collision Deductible Waiver","unique_id":"333"},"text":"$100 deductible/Collision Deductible Waiver","children":[]},{"id":334,"tagName":"option","attributes":{"code":"000000_0004","value":"$150 deductible","unique_id":"334"},"text":"$150 deductible","children":[]},{"id":335,"tagName":"option","attributes":{"code":"000000_0037","value":"$150 deductible/Collision Deductible Waiver","unique_id":"335"},"text":"$150 deductible/Collision Deductible Waiver","children":[]},{"id":336,"tagName":"option","attributes":{"code":"000000_0005","value":"$200 deductible","unique_id":"336"},"text":"$200 deductible","children":[]},{"id":337,"tagName":"option","attributes":{"code":"000000_0038","value":"$200 deductible/Collision Deductible Waiver","unique_id":"337"},"text":"$200 deductible/Collision Deductible Waiver","children":[]},{"id":338,"tagName":"option","attributes":{"code":"000000_0006","value":"$250 deductible","unique_id":"338"},"text":"$250 deductible","children":[]},{"id":339,"tagName":"option","attributes":{"code":"000000_0039","value":"$250 deductible/Collision Deductible Waiver","unique_id":"339"},"text":"$250 deductible/Collision Deductible Waiver","children":[]},{"id":340,"tagName":"option","attributes":{"code":"000000_0008","value":"$500 deductible","unique_id":"340"},"text":"$500 deductible","children":[]},{"id":341,"tagName":"option","attributes":{"code":"000000_0040","value":"$500 deductible/Collision Deductible Waiver","unique_id":"341"},"text":"$500 deductible/Collision Deductible Waiver","children":[]},{"id":342,"tagName":"option","attributes":{"code":"000000_0009","value":"$1,000 deductible","unique_id":"342"},"text":"$1,000 deductible","children":[]},{"id":343,"tagName":"option","attributes":{"code":"000000_0051","value":"$1,000 deductible/Collision Deductible Waiver","unique_id":"343"},"text":"$1,000 deductible/Collision Deductible Waiver","children":[]},{"id":344,"tagName":"option","attributes":{"code":"000000_0029","value":"$1,500 deductible","unique_id":"344"},"text":"$1,500 deductible","children":[]},{"id":345,"tagName":"option","attributes":{"code":"000000_0125","value":"$1,500 deductible/Collision Deductible Waiver","unique_id":"345"},"text":"$1,500 deductible/Collision Deductible Waiver","children":[]},{"id":346,"tagName":"option","attributes":{"code":"000000_0010","value":"$2,000 deductible","unique_id":"346"},"text":"$2,000 deductible","children":[]},{"id":347,"tagName":"option","attributes":{"code":"000000_0083","value":"$2,000 deductible/Collision Deductible Waiver","unique_id":"347"},"text":"$2,000 deductible/Collision Deductible Waiver","children":[]},{"id":348,"tagName":"option","attributes":{"code":"000000_0061","value":"$2,500 deductible","unique_id":"348"},"text":"$2,500 deductible","children":[]},{"id":349,"tagName":"option","attributes":{"code":"000000_0126","value":"$2,500 deductible/Collision Deductible Waiver","unique_id":"349"},"text":"$2,500 deductible/Collision Deductible Waiver","children":[]},{"id":350,"tagName":"option","attributes":{"code":"000000_0117","value":"I decline","unique_id":"350"},"text":"I decline","children":[]}]},{"id":351,"tagName":"label","attributes":{"for":"Id_df3e996c-4dc1-4d8f-acbc-5f647cb09ccf_20513","id":"Id_df3e996c-4dc1-4d8f-acbc-5f647cb09ccf_20513-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"351"},"text":"Uninsured Motorist Property Damage","children":[{"id":352,"tagName":"span","attributes":{"unique_id":"352"},"text":"Uninsured Motorist Property Damage","children":[]},{"id":353,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"353"},"text":"","children":[{"id":354,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_df3e996c-4dc1-4d8f-acbc-5f647cb09ccf_20513-btn","class":"tooltip-trigger","data-tooltip-view":"Id_df3e996c-4dc1-4d8f-acbc-5f647cb09ccf_20513-tooltip","aria-labelledby":"Id_df3e996c-4dc1-4d8f-acbc-5f647cb09ccf_20513-label","tabindex":"-1","unique_id":"354"},"text":"","children":[{"id":355,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"355"},"text":"","children":[]}]}]}]},{"id":356,"tagName":"select","attributes":{"id":"Id_df3e996c-4dc1-4d8f-acbc-5f647cb09ccf_20513","aria-invalid":"false","data-formotivid":"0012","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"356","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$3,500"}]},"text":"Please SelectI decline$3,500","children":[{"id":357,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"357"},"text":"I decline","children":[]},{"id":358,"tagName":"option","attributes":{"code":"003500_0000","value":"$3,500","unique_id":"358"},"text":"$3,500","children":[]}]},{"id":359,"tagName":"label","attributes":{"for":"Id_e9597af9-aa41-40f5-af9d-673b8391b127_82388","id":"Id_e9597af9-aa41-40f5-af9d-673b8391b127_82388-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"359"},"text":"Emergency Road Service (ERS)","children":[{"id":360,"tagName":"span","attributes":{"unique_id":"360"},"text":"Emergency Road Service (ERS)","children":[]},{"id":361,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"361"},"text":"","children":[{"id":362,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_e9597af9-aa41-40f5-af9d-673b8391b127_82388-btn","class":"tooltip-trigger","data-tooltip-view":"Id_e9597af9-aa41-40f5-af9d-673b8391b127_82388-tooltip","aria-labelledby":"Id_e9597af9-aa41-40f5-af9d-673b8391b127_82388-label","tabindex":"-1","unique_id":"362"},"text":"","children":[{"id":363,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"363"},"text":"","children":[]}]}]}]},{"id":364,"tagName":"select","attributes":{"id":"Id_e9597af9-aa41-40f5-af9d-673b8391b127_82388","aria-invalid":"false","data-formotivid":"0053","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"364","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"Liability Only Vehicle"},{"optionIndex":2,"text":"I accept this coverage"},{"optionIndex":3,"text":"I decline"}]},"text":"Please SelectLiability Only VehicleI accept this coverageI decline","children":[{"id":365,"tagName":"option","attributes":{"code":"000012_0000","value":"Liability Only Vehicle","unique_id":"365"},"text":"Liability Only Vehicle","children":[]},{"id":366,"tagName":"option","attributes":{"code":"000010_0000","value":"I accept this coverage","unique_id":"366"},"text":"I accept this coverage","children":[]},{"id":367,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"367"},"text":"I decline","children":[]}]},{"id":368,"tagName":"label","attributes":{"for":"Id_ad5c5325-736c-4170-8a54-59500c5f4cbe_81719","id":"Id_ad5c5325-736c-4170-8a54-59500c5f4cbe_81719-label","class":"text label--inline ie-fix-flex","tabindex":"-1","unique_id":"368"},"text":"Rental Reimbursement (RR)","children":[{"id":369,"tagName":"span","attributes":{"unique_id":"369"},"text":"Rental Reimbursement (RR)","children":[]},{"id":370,"tagName":"span","attributes":{"class":"tooltip-container","unique_id":"370"},"text":"","children":[{"id":371,"tagName":"a","attributes":{"href":"#","id":"tooltip-Id_ad5c5325-736c-4170-8a54-59500c5f4cbe_81719-btn","class":"tooltip-trigger","data-tooltip-view":"Id_ad5c5325-736c-4170-8a54-59500c5f4cbe_81719-tooltip","aria-labelledby":"Id_ad5c5325-736c-4170-8a54-59500c5f4cbe_81719-label","tabindex":"-1","unique_id":"371"},"text":"","children":[{"id":372,"tagName":"span","attributes":{"class":"icon-info-i","unique_id":"372"},"text":"","children":[]}]}]}]},{"id":373,"tagName":"select","attributes":{"id":"Id_ad5c5325-736c-4170-8a54-59500c5f4cbe_81719","aria-invalid":"false","data-formotivid":"0040","data-qm-encrypt":"false","data-qm-mask":"false","unique_id":"373","options":[{"optionIndex":0,"text":"Please Select"},{"optionIndex":1,"text":"I decline"},{"optionIndex":2,"text":"$35/day, $1,050 max per claim"},{"optionIndex":3,"text":"$45/day, $1,350 max per claim"},{"optionIndex":4,"text":"$50/day, $1,500 max per claim"}]},"text":"Please SelectI decline$35/day, $1,050 max per claim$45/day, $1,350 max per claim$50/day, $1,500 max per claim","children":[{"id":374,"tagName":"option","attributes":{"code":"000117_0000","value":"I decline","unique_id":"374"},"text":"I decline","children":[]},{"id":375,"tagName":"option","attributes":{"code":"001050_0000","value":"$35/day, $1,050 max per claim","unique_id":"375"},"text":"$35/day, $1,050 max per claim","children":[]},{"id":376,"tagName":"option","attributes":{"code":"001350_0000","value":"$45/day, $1,350 max per claim","unique_id":"376"},"text":"$45/day, $1,350 max per claim","children":[]},{"id":377,"tagName":"option","attributes":{"code":"001500_0000","value":"$50/day, $1,500 max per claim","unique_id":"377"},"text":"$50/day, $1,500 max per claim","children":[]}]},{"id":378,"tagName":"div","attributes":{"class":"accordion-headline","aria-expanded":"true","tabindex":"0","role":"button","unique_id":"378"},"text":"Important Messages and Legal Notices","children":[{"id":379,"tagName":"div","attributes":{"class":"accordion-headline-content-wrapper","unique_id":"379"},"text":"Important Messages and Legal Notices","children":[{"id":380,"tagName":"div","attributes":{"class":"accordion-left-content-wrapper","unique_id":"380"},"text":"Important Messages and Legal Notices","children":[{"id":381,"tagName":"div","attributes":{"class":"heading h4","unique_id":"381"},"text":"Important Messages and Legal Notices","children":[]}]}]}]},{"id":382,"tagName":"a","attributes":{"href":"#","class":"nobr","unique_id":"382"},"text":"Edit Assumptions","children":[]},{"id":383,"tagName":"button","attributes":{"role":"button","style":"position:fixed; visibility:visible; cursor:pointer; border:none; background-color:transparent; padding:0px; margin:0px; bottom:503px; left:0px; width:36px; transition:all 0.5s ease 0s;","id":"QSIFeedbackButton-btn","aria-expanded":"false","aria-controls":"QSIFeedbackButton-target-container","unique_id":"383"},"text":"Feedback","children":[{"id":384,"tagName":"div","attributes":{"style":"background:rgb(21, 73, 149); color:rgb(255, 255, 255); padding:10px; position:relative; font-size:15px; display:flex; flex-direction:row; z-index:-1; writing-mode:vertical-rl; border-top-right-radius:0px; border-bottom-right-radius:0px;","unique_id":"384"},"text":"Feedback","children":[{"id":385,"tagName":"div","attributes":{"unique_id":"385"},"text":"Feedback","children":[]}]}]},{"id":386,"tagName":"img","attributes":{"src":"https://zn6lqntoqkewf1uwj-geico.siteintercept.qualtrics.com/WRSiteInterceptEngine/../WRQualtricsShared/Graphics/siteintercept/wr-dialog-close-btn-black.png","alt":"Close","style":"height:17px; width:17px;","unique_id":"386"},"text":"","children":[]}]
diff --git a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss1.png b/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss1.png
deleted file mode 100644
index 5106fc38f..000000000
Binary files a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss1.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss2.png b/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss2.png
deleted file mode 100644
index 367debb25..000000000
Binary files a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss2.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss3.png b/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss3.png
deleted file mode 100644
index c267b83e9..000000000
Binary files a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss3.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss4.png b/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss4.png
deleted file mode 100644
index 1416f439d..000000000
Binary files a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss4.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss5.png b/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss5.png
deleted file mode 100644
index 7d27aaa71..000000000
Binary files a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss5.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss6.png b/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss6.png
deleted file mode 100644
index 07d07d2f8..000000000
Binary files a/tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss6.png and /dev/null differ
diff --git a/tests/smoke_tests/data/geico_closest_coverage/navigation_payload.json b/tests/smoke_tests/data/geico_closest_coverage/navigation_payload.json
deleted file mode 100644
index 5452b0372..000000000
--- a/tests/smoke_tests/data/geico_closest_coverage/navigation_payload.json
+++ /dev/null
@@ -1 +0,0 @@
-{"net_worth_numeric":2000000,"looking_to_protect":["net_worth","owned_vehicles","owned_homes"],"discounts":null,"marital_status":"married","optimize_reason":["policy_expiring"],"spouse_line_of_work":"Lgl/Law Enfcmt/Sec","notes":[],"credit_check_authorized":true,"email":"[email protected]","phone_number":"9999999999","updated_at":"2024-02-21T22:52:49","occupation":"Admin Assist","home":[{"purchase_date":"2014-02-01","manufacture_or_mobile":false,"is_apartment":false,"clients_enter_home":"false","misc_conditions":["trustee_or_estate_or_llc"],"updated_at":"2024-02-21T16:22:16","insurance_cancelled_for_nonpayment_count":0,"replacement_plumbing_system_year":null,"has_other_structures":null,"swimming_pool_type":"in_ground_without_slide","id":10644,"new_purchase":false,"dog_bite_history":false,"replacement_electrical":"original","storm_laminated_glass":"No","intake_id":9173,"resident_count":"5","basement_finished":null,"has_burglar_alarm":true,"inserted_at":"2024-02-21T15:45:46","replacement_plumbing_system":"original","kitchen_counter_material":"Granite or marble","home_ownership":"owned_primary","has_circuit_breakers":true,"has_issues":[],"fireplace_count":"2","bathroom_count":"3","swimming_pool":true,"dog_count":4,"hurricane_resistant_windows":"No","has_pets_or_animals":["dogs"],"animal_kinds":[],"valuables_replacement_cost":null,"policy_expire":"2025-01-29","date_occupied":"2014-02-01","has_basement":false,"possession_replacement_estimate":200000,"roof_type":"clay_tile","replacement_electrical_year":null,"central_air_conditioning":true,"build_date":"2004-01-01","has_more_than_1k_valuables":[],"landlord_required_personal_liability_amount":null,"half_bathroom_count":"1","policy_start":"2024-01-30","additional_homes":"false","home_sqft":"3411","roof_date":"2004-01-01","swimming_pool_fenced":true,"risk_mitigation":["non_smoker","indoor_sprinkler","gated_house"],"construction_quality":"custom","has_fire_alarm":true,"replacement_heating_system_year":null,"has_fence":true,"has_attached_garage":true,"ever_heated_by_oil":null,"replacement_heating_system":"original","has_claim":null,"exterior_insured_by_hoa":"false","address":{"city":"San Mateo","country":null,"id":"5badee81-74fa-4167-b04d-a264eb24e692","inserted_at":"2024-02-21T16:17:07","latitude":null,"longitude":null,"state":"CA","street":"9999 Hillsborough Way","streetnumber":null,"subpremise":null,"suburb":null,"updated_at":"2024-02-21T16:17:07","zip":"92860"},"ideal_coverages":{"coverages":{"dwelling":null,"id":null,"loss_of_use":null,"medical_payments":5000,"other_structures":null,"personal_liability":1000000,"personal_property":300000,"replacement_cost":null},"deductibles":{"deductible":5000,"id":null,"wind_deductible":null}}}],"spouse_decline_auto_reason":null,"previous_address_move_date":null,"continuous_auto_insurance":4,"how_much_can_you_lose":5000,"umbrella_details":{"acres_of_timber_or_farmland":0,"antique_vehicle_count":1,"any_exclusions":false,"at_fault_accident_count":0,"confirm_500k_auto_limits":null,"driver_count":3,"driver_under_22_incident_count":null,"drivers_over_70_count":0,"drivers_over_80":null,"drivers_under_22_count":0,"dwi_incident_count":0,"existing_umbrella_policy":null,"felony":null,"id":"029cc207-19af-4879-93c8-c64cb7397820","ideal_coverages":{"liability_limit":2000000},"jet_ski_count":0,"large_watercraft_count":0,"liability_claims_over_25k":null,"motorized_vehicle_count":4,"moving_violation_count":0,"new_drivers":null,"new_drivers_count":0,"old_driver_incident_count":null,"own_6_or_more_rental_properties":null,"professional_entertainer_or_public_figure":null,"reckless_driving_conviction":null,"residential_properties_outside_us_count":0,"residential_property_count":1},"spouse_license_state":"CA","id":9173,"email_unsubscribed_at":null,"additional_drivers":[{"at_fault_accident_count":null,"birthday":"1970-11-19","dui_or_dwi":null,"full_name":"Lesley M Lukens","gender":"Female","id":304,"inserted_at":"2024-02-21T16:11:48","license_number":"D999999","license_state":"CA","licensed_at_age":16,"line_of_work":"Person.Care/Service","marital_status":"married","moving_violation_count":null,"occupation":null,"relationship":"other","updated_at":"2024-02-21T16:11:48","years_licensed":null}],"spouse_license_number":"F999999","age":"1980-01-03","spouse_dui_or_dwi":false,"education_level":"law_degree","line_of_work":"Trvl/Trnsprt/Warehs","auto_uninsured_reason":null,"covie_link_id":null,"triaged":false,"gender":"Female","licensed_at_age":16,"inserted_at":"2024-02-21T15:45:46","spouse_gender":"Female","self_moving_violation_count":null,"has_claims":null,"self_dui_or_dwi":null,"previous_address":{"city":null,"country":null,"id":"a02c46f2-56c5-4f9d-b822-893c3536cbb7","inserted_at":"2024-02-21T15:45:46","latitude":null,"longitude":null,"state":null,"street":null,"streetnumber":null,"subpremise":null,"suburb":null,"updated_at":"2024-02-21T15:45:46","zip":null},"spouse_licensed_at_age":16,"spouse_education_level":"law_degree","vehicle_types":null,"spouse_at_fault_accident_count":null,"past_claim":[],"desired_quote_speed":"faster","wants_call_from_max":false,"clicked_done_at":"2024-02-21T16:22:15Z","full_name":"Gina M Ferraro","email_prefix":"nKyBbvt52HiyumMJw3pvwW","referred_by":null,"auto_has_insurance":true,"priority":null,"umbrella_has_second_insured":true,"net_worth":null,"vehicles":[{"annual_mileage":25000,"commute_mileage":45,"existing_coverages":null,"id":7595,"ideal_coverages":{"bodily_injury_per_incident_limit":500000,"bodily_injury_per_person_limit":300000,"collision_deductible":2000,"comprehensive_deductible":2000,"id":null,"personal_injury_protection":null,"property_damage_per_incident_limit":500000,"rental_reimbursement_per_incident_limit":null,"rental_reimbursement_per_person_limit":null,"roadside_assistance_limit":null,"underinsured_motorist_bodily_injury_per_incident_limit":500000,"underinsured_motorist_bodily_injury_per_person_limit":250000,"underinsured_motorist_property_limit":null},"inserted_at":"2024-02-21T16:14:26","intake_id":9173,"ownership":"financed","parked":"private_garage","purpose":"commute_work","updated_at":"2024-02-21T16:14:26","usage":null,"usage_by_driver":{},"vehicle":{"style":"4x4 Work Truck 4dr Crew Cab 6.6 ft. SB","model":"Silverado 1500","price_estimate":40058,"year":2021,"make":{"make":"Chevrolet","inserted_at":"2022-12-23T20:15:45","updated_at":"2022-12-23T20:15:45"},"inserted_at":"2022-12-23T21:17:41","updated_at":"2023-02-02T23:13:54","id":38703},"vehicle_id":38703,"vehicle_type":null,"vin":"1GC4YPEY5MF270782"},{"annual_mileage":12000,"commute_mileage":10,"existing_coverages":null,"id":7596,"ideal_coverages":{"bodily_injury_per_incident_limit":500000,"bodily_injury_per_person_limit":300000,"collision_deductible":2000,"comprehensive_deductible":2000,"id":null,"personal_injury_protection":null,"property_damage_per_incident_limit":500000,"rental_reimbursement_per_incident_limit":null,"rental_reimbursement_per_person_limit":null,"roadside_assistance_limit":null,"underinsured_motorist_bodily_injury_per_incident_limit":500000,"underinsured_motorist_bodily_injury_per_person_limit":250000,"underinsured_motorist_property_limit":null},"inserted_at":"2024-02-21T16:15:14","intake_id":9173,"ownership":"financed","parked":"private_garage","purpose":"commute_work","updated_at":"2024-02-21T16:15:14","usage":null,"usage_by_driver":{},"vehicle":{"style":"4x2 SLE 4dr SUV","model":"Yukon XL","price_estimate":null,"year":2023,"make":{"make":"GMC","inserted_at":"2022-12-23T20:19:16","updated_at":"2022-12-23T20:19:16"},"inserted_at":"2022-12-23T20:19:43","updated_at":"2023-02-02T22:51:59","id":33592},"vehicle_id":33592,"vehicle_type":null,"vin":"1GKS2JKL0PR435661"},{"annual_mileage":1000,"commute_mileage":null,"existing_coverages":null,"id":7597,"ideal_coverages":{"bodily_injury_per_incident_limit":500000,"bodily_injury_per_person_limit":300000,"collision_deductible":2000,"comprehensive_deductible":2000,"id":null,"personal_injury_protection":null,"property_damage_per_incident_limit":500000,"rental_reimbursement_per_incident_limit":null,"rental_reimbursement_per_person_limit":null,"roadside_assistance_limit":null,"underinsured_motorist_bodily_injury_per_incident_limit":500000,"underinsured_motorist_bodily_injury_per_person_limit":250000,"underinsured_motorist_property_limit":null},"inserted_at":"2024-02-21T16:16:03","intake_id":9173,"ownership":"owned","parked":"private_garage","purpose":"pleasure","updated_at":"2024-02-21T16:16:03","usage":null,"usage_by_driver":{},"vehicle":{"style":"Base","model":"Camaro","price_estimate":null,"year":1994,"make":{"make":"Chevrolet","inserted_at":"2022-12-23T20:15:45","updated_at":"2022-12-23T20:15:45"},"inserted_at":"2023-09-11T23:46:00","updated_at":"2023-09-11T23:46:00","id":87251},"vehicle_id":87251,"vehicle_type":null,"vin":"2G1FP22P9R2179820"},{"annual_mileage":12000,"commute_mileage":8,"existing_coverages":null,"id":7594,"ideal_coverages":{"bodily_injury_per_incident_limit":500000,"bodily_injury_per_person_limit":300000,"collision_deductible":2000,"comprehensive_deductible":2000,"id":null,"personal_injury_protection":null,"property_damage_per_incident_limit":500000,"rental_reimbursement_per_incident_limit":null,"rental_reimbursement_per_person_limit":null,"roadside_assistance_limit":null,"underinsured_motorist_bodily_injury_per_incident_limit":500000,"underinsured_motorist_bodily_injury_per_person_limit":250000,"underinsured_motorist_property_limit":null},"inserted_at":"2024-02-21T16:13:32","intake_id":9173,"ownership":"owned","parked":"private_garage","purpose":"commute_work","updated_at":"2024-02-21T16:13:32","usage":null,"usage_by_driver":{},"vehicle":{"style":"Standard 4dr SUV","model":"Escalade ESV","price_estimate":41391,"year":2017,"make":{"make":"Cadillac","inserted_at":"2022-12-23T20:13:34","updated_at":"2022-12-23T20:13:34"},"inserted_at":"2022-12-23T23:20:55","updated_at":"2023-02-02T23:28:01","id":51193},"vehicle_id":51193,"vehicle_type":null,"vin":"1GYS4KKJ6HR284878"}],"referred_by_intake_id":null,"spouse_full_name":"Linsey L Krauss","spouse_occupation":"Paralegal/Law Clerk","auto_current_carrier":"Liberty Mutual","spouse_age":"1982-06-16","license_state":"CA","current_address_move_date":"2014-02-01","monthly_auto_premium":null,"cash_on_hand":null,"requires_sr22":false,"spouse_moving_violation_count":null,"last_observed_field":"resident_count","workflow":"Quoting","years_licensed":null,"spouse_added_to_auto_policy":true,"licensed_driver":true,"covie_details":[],"self_at_fault_accident_count":null,"spouse_email":"[email protected]","created_at":null,"home_commercial_uses":null,"license_number":"B9999999","paperform_id":"42de414e-0fd5-4da7-ae7c-a4fecc78b756","submitted_at":"2024-02-21T16:22:15Z","auto_commercial_uses":false,"auto_insurance_deadline":"2024-03-01","current_step":110,"address":{"city":"San Mateo","country":null,"id":"b9fb133f-a023-4c5d-b5cc-2ec3f471130c","inserted_at":"2024-02-21T15:45:46","latitude":null,"longitude":null,"state":"CA","street":"9999 Hillsborough Way","streetnumber":null,"subpremise":null,"suburb":null,"updated_at":"2024-02-21T15:48:31","zip":"92860"}}
diff --git a/tests/smoke_tests/data/quote_page_need_recalculation.png b/tests/smoke_tests/data/quote_page_need_recalculation.png
deleted file mode 100644
index d51dc729f..000000000
Binary files a/tests/smoke_tests/data/quote_page_need_recalculation.png and /dev/null differ
diff --git a/tests/smoke_tests/data/workable_yes_or_no/element_tree.json b/tests/smoke_tests/data/workable_yes_or_no/element_tree.json
deleted file mode 100644
index 6bfe785d4..000000000
--- a/tests/smoke_tests/data/workable_yes_or_no/element_tree.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"id":0,"tagName":"a","attributes":{"href":"/employer-direct-healthcare/"},"children":[{"id":1,"tagName":"img","attributes":{"src":"https://workablehr.s3.amazonaws.com/uploads/account/logo/480945/logo"}}]},{"id":2,"tagName":"a","attributes":{"href":"/employer-direct-healthcare/j/037FD88783/"},"text":"Overview"},{"id":3,"tagName":"a","attributes":{"aria-current":"page","href":"/employer-direct-healthcare/j/037FD88783/apply/"},"text":"Application"},{"id":4,"tagName":"button","attributes":{"type":"button"},"text":"Import resume from","children":[{"id":5,"tagName":"div","text":"Import resume from;","children":[{"id":6,"tagName":"span","text":"Import resume from"}]}]},{"id":7,"tagName":"a","attributes":{"aria-label":"Clear Personal information"},"text":"Clear"},{"id":8,"tagName":"label","text":"Nickname (Optional)","children":[{"id":9,"tagName":"input","attributes":{"aria-required":true,"id":"nickname","name":"nickname","type":"text","value":""}}]},{"id":10,"tagName":"label","text":"*First name","children":[{"id":11,"tagName":"input","attributes":{"aria-required":true,"id":"firstname","maxlength":"127","name":"firstname","required":true,"type":"text","value":""}}]},{"id":12,"tagName":"label","text":"*Last name","children":[{"id":13,"tagName":"input","attributes":{"aria-required":true,"id":"lastname","maxlength":"127","name":"lastname","required":true,"type":"text","value":""}}]},{"id":14,"tagName":"label","text":"*Email","children":[{"id":15,"tagName":"input","attributes":{"aria-required":true,"id":"email","maxlength":"255","name":"email","required":true,"type":"email","value":""}}]},{"id":16,"tagName":"label","text":"Headline (Optional)","children":[{"id":17,"tagName":"input","attributes":{"aria-required":true,"id":"headline","maxlength":"255","name":"headline","type":"text","value":""}}]},{"id":18,"tagName":"label","text":"*Phone","children":[{"id":19,"tagName":"div","children":[{"id":20,"tagName":"div","children":[{"id":21,"tagName":"div","children":[{"id":22,"tagName":"div","children":[{"id":23,"tagName":"div","children":[{"id":24,"tagName":"div","attributes":{"title":"Canada:+1"},"text":"+1","children":[{"id":25,"tagName":"div"},{"id":26,"tagName":"div","text":"+1"},{"id":27,"tagName":"div"}]}]},{"id":28,"tagName":"input","attributes":{"aria-required":true,"maxlength":"255","name":"phone","required":true,"type":"tel","value":""}}]}]}]}]}]},{"id":29,"tagName":"label","text":"Address (Optional)","children":[{"id":30,"tagName":"input","attributes":{"aria-required":true,"id":"address","name":"address","type":"text","value":""}}]},{"id":31,"tagName":"label","attributes":{"for":"input_files_input_UrWAUBIyH7qELLw5"}},{"id":32,"tagName":"label","attributes":{"for":"input_files_input_UrWAUBIyH7qELLw5"},"text":"Upload a file; or drag and drop here","children":[{"id":33,"tagName":"span","text":"Upload a file"}]},{"id":34,"tagName":"input","attributes":{"id":"input_files_input_UrWAUBIyH7qELLw5","type":"file","value":""}},{"id":35,"tagName":"a","attributes":{"aria-label":"Clear Profile"},"text":"Clear"},{"id":36,"tagName":"button","attributes":{"aria-label":"Add Education","type":"button"},"text":"+ Add"},{"id":37,"tagName":"label","text":"Years of relevant experience (Optional)","children":[{"id":38,"tagName":"input","attributes":{"aria-required":true,"id":"years-of-experience","name":"years-of-experience","type":"number","value":""}}]},{"id":39,"tagName":"button","attributes":{"aria-label":"Add Experience","type":"button"},"text":"+ Add"},{"id":40,"tagName":"label","text":"Summary (Optional)","children":[{"id":41,"tagName":"textarea","attributes":{"aria-required":true,"id":"summary","name":"summary","type":"text","value":""}}]},{"id":42,"tagName":"label","attributes":{"for":"input_files_input_UtdRp6wGgNAYGaDv"}},{"id":43,"tagName":"label","attributes":{"for":"input_files_input_UtdRp6wGgNAYGaDv"},"text":"Upload a file; or drag and drop here","children":[{"id":44,"tagName":"span","text":"Upload a file"}]},{"id":45,"tagName":"input","attributes":{"id":"input_files_input_UtdRp6wGgNAYGaDv","type":"file","required":true,"value":""}},{"id":46,"tagName":"a","attributes":{"aria-label":"Clear Details"},"text":"Clear"},{"id":47,"tagName":"label","text":"Cover letter (Optional)","children":[{"id":48,"tagName":"textarea","attributes":{"aria-required":true,"id":"cover_letter","maxlength":"200000","name":"cover_letter","type":"text","value":""}}]},{"id":49,"tagName":"label","text":"*What are your salary expectations?","children":[{"id":50,"tagName":"input","attributes":{"aria-required":true,"id":"CA_8479","maxlength":"127","name":"CA_8479","required":true,"type":"text","value":""}}]},{"id":51,"tagName":"div","attributes":{"aria-checked":true,"aria-required":true},"context":"*Are you authorized to work in the US?","children":[{"id":52,"tagName":"label","text":"yes","children":[{"id":53,"tagName":"input","attributes":{"aria-required":true,"required":true,"id":"zgWtXCkTqacZHU1V","type":"radio","name":"CA_8484","value":"true"}},{"id":54,"tagName":"div","text":"yes","children":[{"id":55,"tagName":"div","text":"; yes","children":[{"id":56,"tagName":"span","text":"yes"}]}]}]}]},{"id":57,"tagName":"div","attributes":{"aria-checked":true,"aria-required":true},"context":"*Are you authorized to work in the US?","children":[{"id":58,"tagName":"label","text":"no","children":[{"id":59,"tagName":"input","attributes":{"aria-required":true,"required":true,"id":"P6bEj86ZNzqVZKvo","type":"radio","name":"CA_8484","value":"false"}},{"id":60,"tagName":"div","text":"no","children":[{"id":61,"tagName":"div","text":"; no","children":[{"id":62,"tagName":"span","text":"no"}]}]}]}]},{"id":63,"tagName":"div","attributes":{"aria-checked":true,"aria-required":true},"context":"*Will you now or in the future require sponsorship for employment?","children":[{"id":64,"tagName":"label","text":"yes","children":[{"id":65,"tagName":"input","attributes":{"aria-required":true,"required":true,"id":"JS0QDaHoCVqUP0uj","type":"radio","name":"CA_8485","value":"true"}},{"id":66,"tagName":"div","text":"yes","children":[{"id":67,"tagName":"div","text":"; yes","children":[{"id":68,"tagName":"span","text":"yes"}]}]}]}]},{"id":69,"tagName":"div","attributes":{"aria-checked":true,"aria-required":true},"context":"*Will you now or in the future require sponsorship for employment?","children":[{"id":70,"tagName":"label","text":"no","children":[{"id":71,"tagName":"input","attributes":{"aria-required":true,"required":true,"id":"L84ByczNkoHOmOaw","type":"radio","name":"CA_8485","value":"false"}},{"id":72,"tagName":"div","text":"no","children":[{"id":73,"tagName":"div","text":"; no","children":[{"id":74,"tagName":"span","text":"no"}]}]}]}]},{"id":75,"tagName":"label","text":"*If you were referred by an employee, please indicate who.","children":[{"id":76,"tagName":"input","attributes":{"aria-required":true,"id":"CA_8590","maxlength":"127","name":"CA_8590","required":true,"type":"text","value":""}}]},{"id":77,"tagName":"label","text":"*Please indicate your relationship to your referral.","children":[{"id":78,"tagName":"input","attributes":{"aria-required":true,"id":"CA_15283","maxlength":"127","name":"CA_15283","required":true,"type":"text","value":""}}]},{"id":79,"tagName":"div","attributes":{"aria-checked":true,"aria-required":true},"text":"yes","children":[{"id":80,"tagName":"label","text":"yes","children":[{"id":81,"tagName":"input","attributes":{"aria-required":true,"required":true,"id":"EUORrSca6I1s8OcI","type":"radio","name":"QA_7571433","value":"true"}},{"id":82,"tagName":"div","text":"yes","children":[{"id":83,"tagName":"div","text":"; yes","children":[{"id":84,"tagName":"span","text":"yes"}]}]}]}]},{"id":85,"tagName":"div","attributes":{"aria-checked":true,"aria-required":true},"text":"no","children":[{"id":86,"tagName":"label","text":"no","children":[{"id":87,"tagName":"input","attributes":{"aria-required":true,"required":true,"id":"G5dgUvcRDWSHtNBB","type":"radio","name":"QA_7571433","value":"false"}},{"id":88,"tagName":"div","text":"no","children":[{"id":89,"tagName":"div","text":"; no","children":[{"id":90,"tagName":"span","text":"no"}]}]}]}]},{"id":91,"tagName":"label","text":"Area of expertise (Optional)","children":[{"id":92,"tagName":"input","attributes":{"aria-required":true,"id":"expertise","name":"expertise","type":"text","value":""}}]},{"id":93,"tagName":"label","text":"*How many years experience do you have in Product Management?","children":[{"id":94,"tagName":"input","attributes":{"aria-required":true,"maxlength":"17","required":true,"name":"QA_7571434","type":"text","value":""}}]},{"id":95,"tagName":"button","attributes":{"type":"submit"},"text":"Submit application"},{"id":96,"tagName":"a","attributes":{"href":"http://edhc.com"},"text":"View website"},{"id":97,"tagName":"a","attributes":{"href":"/employer-direct-healthcare/"},"text":"View all jobs"},{"id":98,"tagName":"a","attributes":{"href":"https://jobseekers.workable.com/hc/en"},"text":"Help;"},{"id":99,"tagName":"a","attributes":{"href":"http://workable.com/web-accessibility-statement"},"text":"Accessibility;"},{"id":100,"tagName":"a","attributes":{"href":"https://jobs.workable.com/?utm_campaign=careers_page&utm_content=careers_page&utm_medium=feature&utm_source=careers_page"},"text":"Workable"}]
diff --git a/tests/smoke_tests/data/workable_yes_or_no/navigation_payload.json b/tests/smoke_tests/data/workable_yes_or_no/navigation_payload.json
deleted file mode 100644
index 04e3cce87..000000000
--- a/tests/smoke_tests/data/workable_yes_or_no/navigation_payload.json
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"Minni Doc","first_name":"Minni","last_name":"Doc","email":"[email protected]","phone_number":"4156804201","portfolio_link":"https://www.amazon.science/author/minidoc","resume_link":"https://test.google.com/resume.pdf","BirthDate":"5/20/1990","Pronouns":"He/him/his","Location":"1 Warriors Way, San Francisco CA 94158","Gender_Identity":"Male","Sexual_Orientation":"Straight","Ethnicity":"Asian/East Asian","Veteran_Status":"N","Disability_Status":"N","Education_Level":"PhD/Doctor","School_Attended":"Stanford University","First_generation_in_college":"Yes","Authorized_to_work_in_US":"Yes","Will you now, or in the future, require sponsorship for employment visa status (e.g. H-1B visa status)?":"No","Current_Employer":"Lyft","Current_Role":"Applied Scientist","LinkedIn":"https://www.linkedin.com/in/xinchi-chen-b1997bb1/","language proficiency":"I am proficient in English and Chinese (Mandarin)","work_experience_1":"company:Amazon AWS, title: Applied Scientist, experience: Lead a team of data scientists, which focus on ML, IR and NLP. We're the core team behind AWS enterprise knowledge base tooling and large language model. QA benchmarking as an example is one of the focus I have here.","work_experience_2":"company:The University of Edingburgh, title: Research Associate, experience: Focused on NLP and deep learning research. Specialized in Capturing argument interaction in semantic role labeling with capsule networks. I also did lots of research on convolutional interaction network for natural language inferences.","work_experience_3":"company:Microsoft, title: Research Intern, experience: Attention-Fused Deep Matching Network for Natural Language Inference","Q01 - What made you go into Data Science / Research in NLP?":"NLP is the perfect combination of my creative and analytical skills. I really love solving hard research problems which could end up benefiting real-world applications that will enhance people's lives. It's such an interesting field that is constantly evolving and I knew I had found my passion when I discovered NLP and data research work.","Q02 - What is your experience with working with developers on a team?":"I have experience creating comprehensive docs for developers. These docs include precise measurements, annotations, and specifics from researches we've done.","Q03 - What is your favorite aspect of software / data science?":"What I love most about software and data science is the fusion of creativity and problem-solving. It allows me to combine my techinical instincts with analytical thinking to craft solutions that not only solves hard problems but benefit people well. I enjoy seeing a product come to life and knowing I had a part in that!","Q04 - Please select your years of experience":"0-5 Years","Q05 - Tell us about your experience and how it relates to this position.":"I'm currently leading a team of research scientists in AWS. To summarize my key skills that relate to this position: Proficiency in designing and implementing LLM systems. Proficiency in leading a scientists team.","Q06 - What are your weaknesses as scientist / developer?":"One of my current areas for improvement lies in my familiarity with certain used tools in the industry, as I haven't worked outside of AWS in the industry. Most of the tools I've been using are built within Amazon AWS","Q07 - Have you worked remotely before?":"Yes","Q08 - Are you comfortable meeting often or even daily for meeting that require you to be on video?":"Yes","Q09 - What are your career goals?":"I envision a lifelong career in data, research and engineering. Always growing and expanding my skillset as the field continues to evolve. I'd like to eventually choose a niche to focus on. I would also like to take on DS lead or manager role eventually to use my leadership skills to drive impact on a team!","expected salary":"I am currently interviewing for roles ranging 180,000 to 250,000."}
diff --git a/tests/smoke_tests/data/workable_yes_or_no/screenshot1.png b/tests/smoke_tests/data/workable_yes_or_no/screenshot1.png
deleted file mode 100644
index 179563848..000000000
Binary files a/tests/smoke_tests/data/workable_yes_or_no/screenshot1.png and /dev/null differ
diff --git a/tests/smoke_tests/data/workable_yes_or_no/screenshot2.png b/tests/smoke_tests/data/workable_yes_or_no/screenshot2.png
deleted file mode 100644
index eaa6759aa..000000000
Binary files a/tests/smoke_tests/data/workable_yes_or_no/screenshot2.png and /dev/null differ
diff --git a/tests/smoke_tests/data/workable_yes_or_no/screenshot3.png b/tests/smoke_tests/data/workable_yes_or_no/screenshot3.png
deleted file mode 100644
index a49bb6aa2..000000000
Binary files a/tests/smoke_tests/data/workable_yes_or_no/screenshot3.png and /dev/null differ
diff --git a/tests/smoke_tests/data/workable_yes_or_no/screenshot4.png b/tests/smoke_tests/data/workable_yes_or_no/screenshot4.png
deleted file mode 100644
index debba83e8..000000000
Binary files a/tests/smoke_tests/data/workable_yes_or_no/screenshot4.png and /dev/null differ
diff --git a/tests/smoke_tests/test_pdf_fill_block.py b/tests/smoke_tests/test_pdf_fill_block.py
deleted file mode 100644
index 4a6e05e01..000000000
--- a/tests/smoke_tests/test_pdf_fill_block.py
+++ /dev/null
@@ -1,178 +0,0 @@
-"""End-to-end smoke tests for the pdf_fill block: YAML definition -> converter -> execute.
-
-External boundaries (LLM, tesseract subprocess) are faked; PDF parsing, templating,
-sanitization, filling, and overlay rendering all run for real.
-"""
-
-from __future__ import annotations
-
-from pathlib import Path
-from typing import Any
-from unittest.mock import AsyncMock, MagicMock
-
-import pdfplumber
-import pytest
-from pypdf import PdfReader
-
-from skyvern.forge.sdk.workflow.models.block import PdfFillBlock
-from skyvern.forge.sdk.workflow.workflow_definition_converter import convert_workflow_definition
-from skyvern.schemas.workflows import BlockStatus, PdfFillBlockYAML, WorkflowDefinitionYAML
-from tests.unit.fake_workflow_run_context import FakeWorkflowRunContext
-from tests.unit.test_pdf_fill_block import _write_fillable_pdf, _write_flat_pdf
-
-
-class SmokePdfFillContext(FakeWorkflowRunContext):
- organization_id = None
-
- def has_parameter(self, key: str) -> bool:
- return key in self.values
-
- def get_value(self, key: str) -> Any:
- return self.values[key]
-
- def resolve_effective_workflow_system_prompt(self, *_args: Any, **_kwargs: Any) -> None:
- return None
-
- def record_block_workflow_system_prompt(self, *_args: Any, **_kwargs: Any) -> None:
- return None
-
- async def register_output_parameter_value_post_execution(self, parameter: Any, value: Any) -> None:
- self.set_value(parameter.key, value)
-
-
-def _build_pdf_fill_block(monkeypatch: pytest.MonkeyPatch, tmp_path: Path, **yaml_overrides: Any) -> PdfFillBlock:
- yaml_kwargs: dict[str, Any] = {
- "block_type": "pdf_fill",
- "label": "fill_form",
- "file_url": "{{ source_pdf }}",
- "prompt": "Fill the form from the payload.",
- "payload": {"name": "Jane A Doe"},
- }
- yaml_kwargs.update(yaml_overrides)
- definition = convert_workflow_definition(
- WorkflowDefinitionYAML(parameters=[], blocks=[PdfFillBlockYAML(**yaml_kwargs)]),
- workflow_id="wf_pdf_fill_smoke",
- )
- block = definition.blocks[0]
- assert isinstance(block, PdfFillBlock)
- monkeypatch.setattr(
- "skyvern.forge.sdk.workflow.models.pdf_fill_block.get_path_for_workflow_download_directory",
- lambda workflow_run_id: tmp_path / "downloads" / workflow_run_id,
- )
- return block
-
-
-def _run_local_pdf_path(monkeypatch: pytest.MonkeyPatch, tmp_path: Path, run_id: str, name: str) -> Path:
- # Local source paths must resolve inside the run's download directory, or _resolve_source_pdf's
- # path-containment check rejects them.
- download_root = tmp_path / "downloads"
- monkeypatch.setattr("skyvern.forge.sdk.workflow.models.pdf_fill_block.settings.DOWNLOAD_PATH", str(download_root))
- run_dir = download_root / run_id
- run_dir.mkdir(parents=True, exist_ok=True)
- return run_dir / name
-
-
-def _install_context(monkeypatch: pytest.MonkeyPatch, values: dict[str, Any]) -> SmokePdfFillContext:
- context = SmokePdfFillContext(values=values)
- monkeypatch.setattr(PdfFillBlock, "get_workflow_run_context", staticmethod(lambda _wr_id: context))
- mock_app = MagicMock()
- mock_app.DATABASE.workflow_runs.create_or_update_workflow_run_output_parameter = AsyncMock()
- mock_app.DATABASE.observer.update_workflow_run_block = AsyncMock()
- monkeypatch.setattr("skyvern.forge.sdk.workflow.models.pdf_fill_block.app", mock_app)
- monkeypatch.setattr("skyvern.forge.sdk.workflow.models.block.app", mock_app)
- return context
-
-
-async def test_acroform_fill_end_to_end_through_converter(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
- source_pdf = _run_local_pdf_path(monkeypatch, tmp_path, "wr_smoke_acroform", "form.pdf")
- _write_fillable_pdf(source_pdf)
-
- async def _llm_response(**_: Any) -> dict[str, Any]:
- return {"fields": {"name": "Jane A Doe", "subscribe": True}, "thought": "mapped"}
-
- block = _build_pdf_fill_block(monkeypatch, tmp_path)
- context = _install_context(monkeypatch, values={"source_pdf": str(source_pdf)})
- monkeypatch.setattr(PdfFillBlock, "_resolve_default_llm_handler", AsyncMock(return_value=_llm_response))
-
- result = await block.execute(workflow_run_id="wr_smoke_acroform", workflow_run_block_id="", organization_id=None)
-
- assert result.success is True
- assert result.status == BlockStatus.completed
- output = result.output_parameter_value
- assert output["fill_mode"] == "acroform"
- filled_fields = PdfReader(output["file_path"]).get_fields()
- assert filled_fields["name"]["/V"] == "Jane A Doe"
- assert filled_fields["subscribe"]["/V"] == "/Yes"
- assert context.values["fill_form_output"]["fill_mode"] == "acroform"
-
-
-async def test_flat_fill_end_to_end_with_fake_tesseract(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
- source_pdf = _run_local_pdf_path(monkeypatch, tmp_path, "wr_smoke_flat", "flat.pdf")
- _write_flat_pdf(source_pdf)
-
- # The 300x200pt flat fixture renders to 625x417px at 150dpi; the TSV mirrors a real tesseract run.
- tsv = (
- "level\tpage_num\tblock_num\tpar_num\tline_num\tword_num\tleft\ttop\twidth\theight\tconf\ttext\n"
- "1\t1\t0\t0\t0\t0\t0\t0\t625\t417\t-1\t\n"
- "5\t1\t1\t1\t1\t1\t40\t60\t60\t14\t92.0\tName:\n"
- )
-
- class FakeProcess:
- returncode = 0
-
- async def communicate(self) -> tuple[bytes, bytes]:
- return tsv.encode(), b""
-
- def kill(self) -> None:
- pass
-
- async def wait(self) -> int:
- return 0
-
- async def fake_subprocess(*_args: Any, **_kwargs: Any) -> FakeProcess:
- return FakeProcess()
-
- async def _llm_response(**_: Any) -> dict[str, Any]:
- return {"placements": [{"anchor_id": 0, "value": "Jane A Doe", "position": "right"}], "thought": "placed"}
-
- block = _build_pdf_fill_block(monkeypatch, tmp_path)
- context = _install_context(monkeypatch, values={"source_pdf": str(source_pdf)})
- monkeypatch.setattr(PdfFillBlock, "_tesseract_available", staticmethod(lambda: True))
- monkeypatch.setattr(
- "skyvern.forge.sdk.workflow.models.pdf_fill_block.asyncio.create_subprocess_exec", fake_subprocess
- )
- monkeypatch.setattr(PdfFillBlock, "_resolve_default_llm_handler", AsyncMock(return_value=_llm_response))
-
- result = await block.execute(workflow_run_id="wr_smoke_flat", workflow_run_block_id="", organization_id=None)
-
- assert result.success is True
- output = result.output_parameter_value
- assert output["fill_mode"] == "flat_overlay"
- assert output["fields"] == {"Name:": "Jane A Doe"}
- with pdfplumber.open(output["file_path"]) as pdf:
- words = {w["text"] for w in pdf.pages[0].extract_words()}
- assert "Jane" in words
- assert context.values["fill_form_output"]["fill_mode"] == "flat_overlay"
-
-
-async def test_file_url_unwraps_upstream_block_output(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
- source_pdf = _run_local_pdf_path(monkeypatch, tmp_path, "wr_smoke_chained", "form.pdf")
- _write_fillable_pdf(source_pdf)
-
- async def _llm_response(**_: Any) -> dict[str, Any]:
- return {"fields": {"name": "Jane A Doe"}, "thought": "mapped"}
-
- block = _build_pdf_fill_block(monkeypatch, tmp_path, file_url="downloader_output")
- _install_context(
- monkeypatch,
- values={"downloader_output": {"downloaded_files": [{"url": str(source_pdf)}]}},
- )
- monkeypatch.setattr(PdfFillBlock, "_resolve_default_llm_handler", AsyncMock(return_value=_llm_response))
-
- result = await block.execute(workflow_run_id="wr_smoke_chained", workflow_run_block_id="", organization_id=None)
-
- assert result.success is True
- assert PdfReader(result.output_parameter_value["file_path"]).get_fields()["name"]["/V"] == "Jane A Doe"
diff --git a/tests/smoke_tests/test_prompts.py b/tests/smoke_tests/test_prompts.py
deleted file mode 100644
index 2a7130191..000000000
--- a/tests/smoke_tests/test_prompts.py
+++ /dev/null
@@ -1,217 +0,0 @@
-import pytest
-from dotenv import load_dotenv
-
-from skyvern.forge import app # noqa: F401
-from skyvern.forge.forge_app_initializer import start_forge_app
-from skyvern.forge.prompts import prompt_engine
-from skyvern.forge.sdk.api.llm.api_handler_factory import LLMAPIHandlerFactory
-
-load_dotenv()
-
-
[email protected](scope="module", autouse=True)
-def setup_forge_app():
- start_forge_app()
- yield
-
-
-VISA_NAVIGATION_PLAYLOAD = {
- "login_credentials": {"username": "[email protected]", "password": "password"},
- "info": {
- "name_of_traveller": "Rajesh Patel",
- "nationality": "Indian",
- "citizenship": "Indian",
- "date_of_birth": "20 Jul 1999",
- "passport_number": "G9999999",
- "date_of_issue": "21 Jul 2014",
- "date_of_expiry": "20 Jul 2024",
- "place_of_issue": "Jaipur",
- "national_identity_card": "Aadhar Card",
- "aadhar_card_number": "300009999999",
- "name_on_aadhar_card": "Rajesh Patel",
- "address": "JMR 999, xyz road, Marathalli, Bengaluru, Karnataka, 560106",
- "relationship_status": "Married",
- "phone_number": "9999999999",
- "email": "[email protected]",
- "date_of_departure_from_india": "01/06/2024",
- "date_of_departure_from_australia": "25/06/2024",
- "employment_type": "Employed",
- "company_name": "XYZ Services",
- "start_date_with_current_employer": "02/02/2023",
- "organisation_address": "JMR 999, xyz road, Marathalli, Bengaluru, Karnataka, 560106",
- "special_category_of_entry": "no",
- "pacific_australia_card": "no",
- "multiple_citizenships": "no",
- "other_travel_documentation": "N/A",
- },
-}
-EXTRACTED_INFORMATION_SCHEMA = """{'additionalProperties': False, 'properties': {'quotes': {'items': {'additionalProperties': False, 'properties': {'coverages': {'items': {'additionalProperties': False, 'properties': {'amount': {'description': "The coverage amount in USD, which can be a single value or a range (e.g., '$300,000' or '$300,000/$300,000').", 'type': 'string'}, 'included': {'description': 'Indicates whether the coverage is included in the policy (true or false).', 'type': 'boolean'}, 'type': {'description': "The type of coverage (e.g., 'Bodily Injury Liability') or deductible name.", 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'premium_amount': {'description': "The total premium amount for the whole quote timeframe in USD, formatted as a string (e.g., '$321.57').", 'type': 'string'}, 'timeframe': {'description': 'The duration of the coverage, typically expressed in months or years.', 'type': 'string'}, 'vehicle_coverages': {'items': {'additionalProperties': False, 'properties': {'collision_deductible': {'description': "The collision deductible amount in USD, which is a single value (e.g., '$500') or null if it is not included", 'type': 'string'}, 'comprehensive_deductible': {'description': "The collision deductible amount in USD, which is a single value (e.g., '$500') or null if it is not included", 'type': 'string'}, 'for_vehicle': {'additionalProperties': False, 'description': 'The vehicle that the collision and comprehensive coverage is for', 'properties': {'make': {'description': 'The make of the vehicle', 'type': 'string'}, 'model': {'description': 'The model of the vehicle', 'type': 'string'}, 'year': {'description': 'The year of the vehicle', 'type': 'string'}}, 'type': 'object'}, 'underinsured_property_damage': {'description': "The underinsured property damage limit for this vehicle, which is a limit and a deductible (e.g., '$25,000/$250 deductible') or null if it is not included", 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}}, 'type': 'object'}"""
-llm_api_handler = LLMAPIHandlerFactory.get_llm_api_handler("OPENAI_GPT5_1")
-
-
[email protected](reason="temporarily disabled: flaky in staging")
-async def test_extract_info_prompt() -> None:
- """
- expected_response = {
- "quotes": [
- {
- "premium_amount": "$1,440.11",
- "timeframe": "6 Month",
- "coverages": [
- {"type": "Bodily Injury Liability", "amount": "$30,000/$60,000", "included": True},
- {"type": "Property Damage Liability", "amount": "$25,000", "included": True},
- {"type": "Medical Payments", "amount": "Not Included", "included": False},
- {"type": "Personal Injury Protection", "amount": "Not Included", "included": False},
- {"type": "Uninsured Motorist Bodily Injury", "amount": "$30,000/$60,000", "included": True},
- {"type": "Upgraded Accident Forgiveness", "amount": "Not Included", "included": False},
- ],
- "vehicle_coverages": [
- {
- "for_vehicle": {"year": "2015", "make": "Audi", "model": "A8"},
- "collision_deductible": "$1,000",
- "comprehensive_deductible": "$1,000",
- "underinsured_property_damage": "$25,000/$250 deductible",
- }
- ],
- }
- ]
- }
- """
- extract_information_prompt = prompt_engine.load_prompt(
- "extract-information",
- data_extraction_goal="extract all quote information in JSON format including the premium amount, and the timeframe for the quote",
- extracted_information_schema=EXTRACTED_INFORMATION_SCHEMA,
- current_url="https://www.geico.com/quote/",
- )
- image_path = "tests/smoke_tests/data/extract_information_screenshot.png"
- image = open(image_path, "rb").read()
- parsed_response = await llm_api_handler(
- prompt=extract_information_prompt, screenshots=[image], step=None, prompt_name="extract-information"
- )
-
- assert "quotes" in parsed_response
- assert len(parsed_response["quotes"]) == 1
-
- # assertions on quote
- quote = parsed_response["quotes"][0]
- expected_quote_attrs = ["premium_amount", "timeframe", "coverages", "vehicle_coverages"]
- for attr in expected_quote_attrs:
- assert attr in quote
- # assert quote["premium_amount"] == "$1,440.11"
- timeframe_lowercase = quote["timeframe"].lower()
- assert timeframe_lowercase == "6 month" or timeframe_lowercase == "6 months"
- assert len(quote["coverages"]) == 6
-
- # assertions on coverages
- expected_coverage_types = {
- "Bodily Injury Liability",
- "Property Damage Liability",
- "Medical Payments",
- "Personal Injury Protection",
- "Uninsured Motorist Bodily Injury",
- "Upgraded Accident Forgiveness",
- }
- for expected_coverage_type in expected_coverage_types:
- assert any([expected_coverage_type in coverage["type"] for coverage in quote["coverages"]])
- for coverage in quote["coverages"]:
- if "Bodily Injury Liability" in coverage["type"]:
- assert coverage["included"] is True
- assert coverage["amount"] == "$30,000/$60,000" or coverage["amount"] == "$30000/$60000"
- elif "Property Damage Liability" in coverage["type"]:
- assert coverage["included"] is True
- assert coverage["amount"] == "$25,000" or coverage["amount"] == "$25000"
- elif "Medical Payments" in coverage["type"]:
- assert coverage["included"] is False
- elif "Personal Injury Protection" in coverage["type"]:
- assert coverage["included"] is False
- elif "Uninsured Motorist Bodily Injury" in coverage["type"]:
- assert coverage["amount"] == "$30,000/$60,000" or coverage["amount"] == "$30000/$60000"
- assert coverage["included"] is True
- elif "Upgraded Accident Forgiveness" in coverage["type"]:
- assert coverage["included"] is False
-
- # assertions on vehicle
- assert len(quote["vehicle_coverages"]) == 1
- vehicle = quote["vehicle_coverages"][0]
- assert vehicle["for_vehicle"] == {"year": "2015", "make": "Audi", "model": "A8"}
- assert "$1,000" in vehicle["collision_deductible"] or "$1000" in vehicle["collision_deductible"]
- assert "$1,000" in vehicle["comprehensive_deductible"] or "$1000" in vehicle["comprehensive_deductible"]
- assert vehicle["underinsured_property_damage"] == "$25,000/$250 deductible"
-
-
-# @pytest.mark.asyncio
-# async def test_yes_or_no() -> None:
-# prompt = prompt_engine.load_prompt(
-# "extract-action",
-# navigation_goal="Login Into the Portal >> Click On Add New Applicaiton >> Select Visa Category -Visitor> Click on Visa Visitor (600)>> fill out the application. Refer to error banner on the top when there are errors but do not click any of those links. Do not use any link from 'Related Links' or 'Help and Support'. You're done when the application is successfully filled out",
-# navigation_payload_str=json.dumps(VISA_NAVIGATION_PLAYLOAD),
-# url="https://online.immi.gov.au/elp/app",
-# elements=get_complex_element_tree(),
-# data_extraction_goal=None,
-# action_history=[],
-# utc_datetime=datetime.utcnow(),
-# )
-
-# screenshot1 = encode_image("tests/smoke_tests/data/complex_context_screenshot1.png")
-# screenshot2 = encode_image("tests/smoke_tests/data/complex_context_screenshot2.png")
-# llm_request = build_chat_request(prompt, [screenshot1, screenshot2])
-# response = await openai_client.client.chat.completions.with_raw_response.create(**llm_request)
-# chat_completion = response.parse()
-# parse_response(chat_completion)
-# assert True
-
-
-# @pytest.mark.asyncio
-# async def test_geico_closest_coverage() -> None:
-# prompt = prompt_engine.load_prompt(
-# "extract-action",
-# navigation_goal="Navigate through the website until you generate an auto insurance quote. Only stay on the\nstarting website, do not navigate to other carrier websites.\nDo not start over, terminate instead.\nIf the only options are going to a different carrier's website or talking to an agent, terminate.\nDo not generate a home insurance quote.\nChoose the following coverage levels\n * Bodily Injury: $300k/500k\n * Property Damage: 500k\n * Underinsured Motorist Bodily Injury: $250k/500k\nChoose the following deductibles for the vehicles:\n * 2021 Chevrolet Silverado 1500 collision deductible of $2000 and comprehensive deductible of $2000\n * 2023 GMC Yukon XL collision deductible of $2000 and comprehensive deductible of $2000\n * 1994 Chevrolet Camaro collision deductible of $2000 and comprehensive deductible of $2000\n * 2017 Cadillac Escalade ESV collision deductible of $2000 and comprehensive deductible of $2000\nChoose coverages and deductibles that are consistent with the ideal_coverages key.\nIf the coverage level we're looking for is not in the option list, select available coverage level that's closest to what we're looking for. Example 1: if the options are $5,000, $10,000, $15,000, $20,000, $25,000, $50,000, $100,000, and the wanted level is $500,000, select $100,000 as it's the closest number to $500,000. Example 2: if the options are $5,000, $10,000, $15,000, $20,000, $25,000, $50,000, $100,000, and the wanted level is $70,000. 70000-5000=65000, 70000-10000=60000, 70000-15000=55000, 70000-25000, 70000-50000 = 20000, 100000-70000=30000. 20000 is the smallest so $50,000 is the closest coverage, select $50,000\nIf this page contains an auto insurance quote, consider the goal achieved.\n\nIf auto insurance quote amount, which should be number that represents money, is not found,\nthink if there are still actions to take to get the amount. For examples, sometimes\nyou need to recalculate the quote if you have updated the coverages.",
-# navigation_payload_str=get_file("tests/smoke_tests/data/geico_closest_coverage/navigation_payload.json"),
-# url="https://www.geico.com",
-# elements=get_file("tests/smoke_tests/data/geico_closest_coverage/element_tree.json"),
-# data_extraction_goal='Extract all quote information in JSON format including the premium amount, the timeframe for the quote. The bodily injury, property damage, and underinsured motorist coverages should be returned in the "coverages" key. The collision and comprehensive deductibles should be returned in the "vehicle_coverages" key as they are specific to each vehicle. Also return the quote number.',
-# action_history=[],
-# utc_datetime=datetime.utcnow(),
-# )
-
-# screenshot1 = encode_image("tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss1.png")
-# screenshot2 = encode_image("tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss2.png")
-# screenshot3 = encode_image("tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss3.png")
-# screenshot4 = encode_image("tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss4.png")
-# screenshot5 = encode_image("tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss5.png")
-# screenshot6 = encode_image("tests/smoke_tests/data/geico_closest_coverage/geico_closest_coverage_prompt_ss6.png")
-# llm_request = build_chat_request(
-# prompt,
-# [screenshot1, screenshot2, screenshot3, screenshot4, screenshot5, screenshot6],
-# )
-# response = await openai_client.client.chat.completions.with_raw_response.create(**llm_request)
-# chat_completion = response.parse()
-# parse_response(chat_completion)
-# assert True
-
-
-# @pytest.mark.asyncio
-# async def test_workable_yes_or_no() -> None:
-# prompt = prompt_engine.load_prompt(
-# "extract-action",
-# navigation_goal="Apply for a job. Terminate if the job is not available. Fill out all of the fields as best you can, including optional fields. Be safe when filling out fields where the user didn't specify any details for. Consider the goal achieved when all the relevant fields are completed and the job application is submitted successfully. Job application is submitted successfully when it's indicated on the page. If there are constraints for the job application that the applicant isn't satisfying the requirements for (such as language proficiency, job location), terminate with appropriate reasoning.",
-# navigation_payload_str=get_file("tests/smoke_tests/data/workable_yes_or_no/navigation_payload.json"),
-# url="https://apply.workable.com/employer-direct-healthcare/j/037FD88783/apply/",
-# elements=get_file("tests/smoke_tests/data/workable_yes_or_no/element_tree.json"),
-# action_history=[],
-# utc_datetime=datetime.utcnow(),
-# )
-
-# screenshot1 = encode_image("tests/smoke_tests/data/workable_yes_or_no/screenshot1.png")
-# screenshot2 = encode_image("tests/smoke_tests/data/workable_yes_or_no/screenshot2.png")
-# screenshot3 = encode_image("tests/smoke_tests/data/workable_yes_or_no/screenshot3.png")
-# screenshot4 = encode_image("tests/smoke_tests/data/workable_yes_or_no/screenshot4.png")
-# llm_request = build_chat_request(
-# prompt,
-# [screenshot1, screenshot2, screenshot3, screenshot4],
-# )
-# response = await openai_client.client.chat.completions.with_raw_response.create(**llm_request)
-# chat_completion = response.parse()
-# parse_response(chat_completion)
-# assert True
diff --git a/tests/unit/force_stub_app.py b/tests/unit/force_stub_app.py
index 90bc12e50..44a743b92 100644
--- a/tests/unit/force_stub_app.py
+++ b/tests/unit/force_stub_app.py
@@ -21,6 +21,7 @@ def create_forge_stub_app() -> ForgeApp:
fake_app_module.WORKFLOW_CONTEXT_MANAGER.secret_redaction_enabled_for_run = MagicMock(return_value=False)
fake_app_module.WORKFLOW_CONTEXT_MANAGER.artifact_redaction_enabled = MagicMock(return_value=False)
fake_app_module.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run = MagicMock(return_value=set())
+ fake_app_module.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts = MagicMock(return_value=set())
# Sync liveness predicate — _LazyNamespace would auto-mock it as a truthy (never-awaited) AsyncMock,
# making every wr_ alias read as a live sharer. Default to "no run is live" so tests must opt a run
# into liveness explicitly (non-PBS ownership signal).
diff --git a/tests/unit/test_agent_task_v3.py b/tests/unit/test_agent_task_v3.py
index 533c0fa9f..8406d3d4b 100644
--- a/tests/unit/test_agent_task_v3.py
+++ b/tests/unit/test_agent_task_v3.py
@@ -17,16 +17,30 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest
+from skyvern.exceptions import MissingBrowserStatePage
from skyvern.forge import agent as agent_module
from skyvern.forge.agent import ForgeAgent
from skyvern.forge.sdk.artifact.manager import ArtifactManager
from skyvern.forge.sdk.core import skyvern_context
from skyvern.forge.sdk.core.skyvern_context import SkyvernContext
+from skyvern.forge.sdk.db.enums import TaskType
from skyvern.forge.sdk.models import Step, StepStatus
from skyvern.forge.sdk.schemas.tasks import TaskStatus
+from skyvern.forge.sdk.workflow.models.block import (
+ ActionBlock,
+ BaseTaskBlock,
+ ExtractionBlock,
+ HumanInteractionBlock,
+ LoginBlock,
+ NavigationBlock,
+ TaskBlock,
+ ValidationBlock,
+)
+from skyvern.forge.sdk.workflow.models.parameter import CredentialParameter, OutputParameter, ParameterType
+from skyvern.forge.sdk.workflow.models.workflow import WorkflowRunStatus
from skyvern.forge.taskv3.engine import MIN_ACTION_STEPS
from skyvern.forge.taskv3.loop import LoopOutcome
-from skyvern.webeye.actions.actions import ActionType
+from skyvern.webeye.actions.actions import ActionStatus, ActionType
from tests.unit.helpers import make_browser_state, make_organization, make_step, make_task
@@ -36,6 +50,15 @@ async def _run_execute_task_v3(
post_step_side_effect: BaseException | None = None,
action_rounds: list[list[tuple[str, dict[str, Any]]]] | None = None,
screenshot_raises: bool = False,
+ task_block: BaseTaskBlock | None = None,
+ validation_without_page_information: bool = False,
+ provider_probe_calls: int = 0,
+ get_working_page_side_effect: list[Any] | None = None,
+ must_get_working_page_side_effect: BaseException | list[Any] | None = None,
+ loop_raises: BaseException | None = None,
+ update_task_side_effect: BaseException | None = None,
+ completion_gate_vetoes: bool = False,
+ initial_active_credential_parameter_key: str | None = None,
context_overrides: dict[str, Any] | None = None,
**task_overrides: Any,
) -> tuple[Step, Any, AsyncMock, AsyncMock]:
@@ -46,20 +69,34 @@ async def _run_execute_task_v3(
step = make_step(now, task, step_id="step-v3", status=StepStatus.created, order=0, output=None)
browser_state, _, page = make_browser_state()
- browser_state.must_get_working_page = AsyncMock(return_value=page)
+ browser_state.must_get_working_page = AsyncMock(return_value=page, side_effect=must_get_working_page_side_effect)
+ if get_working_page_side_effect is not None:
+ browser_state.get_working_page = AsyncMock(side_effect=get_working_page_side_effect)
+ else:
+ browser_state.get_working_page = AsyncMock(return_value=page)
browser_state.take_post_action_screenshot = AsyncMock(
return_value=b"png-bytes",
side_effect=RuntimeError("screenshot boom") if screenshot_raises else None,
)
async def _loop(**kwargs: Any) -> LoopOutcome:
+ # Exposed so tests can probe context state as seen from inside the loop (and, since this
+ # runs before any loop_raises, even when the loop goes on to raise).
+ loop_mock.context = context
+ loop_mock.active_credential_parameter_key_during_loop = context.active_credential_parameter_key
cb = kwargs.get("on_action_round")
if cb is not None and action_rounds:
for round_actions in action_rounds:
await cb(round_actions)
+ if provider_probe_calls:
+ provider = kwargs["page_provider"]
+ loop_mock.resolved_pages = [await provider() for _ in range(provider_probe_calls)]
+ if loop_raises is not None:
+ raise loop_raises
return outcome
loop_mock = AsyncMock(side_effect=_loop)
+ loop_mock.browser_state = browser_state
monkeypatch.setattr("skyvern.forge.taskv3.engine.run_task_v3_agent_loop", loop_mock)
monkeypatch.setattr("skyvern.forge.agent.LLMCaller", MagicMock())
monkeypatch.setattr("skyvern.forge.sdk.api.files.resolve_run_download_id", lambda *_a, **_k: "download-1")
@@ -89,20 +126,27 @@ async def _run_execute_task_v3(
task.status = status
if "extracted_information" in _kwargs:
task.extracted_information = _kwargs["extracted_information"]
+ if "failure_reason" in _kwargs:
+ task.failure_reason = _kwargs["failure_reason"]
return task
agent.update_step = AsyncMock(side_effect=fake_update_step)
- agent.update_task = AsyncMock(side_effect=fake_update_task)
+ agent.update_task = AsyncMock(side_effect=update_task_side_effect or fake_update_task)
agent.clean_up_task = AsyncMock()
post_step_mock = AsyncMock(side_effect=post_step_side_effect)
monkeypatch.setattr("skyvern.forge.agent.app.AGENT_FUNCTION.post_step_execution", post_step_mock)
+ completion_gate = AsyncMock(return_value=not completion_gate_vetoes)
+ monkeypatch.setattr("skyvern.forge.agent.app.AGENT_FUNCTION.gate_step_completion", completion_gate)
+ loop_mock.completion_gate = completion_gate
context = SkyvernContext(
task_id=task.task_id,
step_id=step.step_id,
organization_id=task.organization_id,
workflow_run_id=task.workflow_run_id,
+ validation_without_page_information=validation_without_page_information,
+ active_credential_parameter_key=initial_active_credential_parameter_key,
)
for name, value in (context_overrides or {}).items():
setattr(context, name, value)
@@ -116,10 +160,13 @@ async def _run_execute_task_v3(
api_key=None,
close_browser_on_completion=True,
browser_session_id=None,
+ task_block=task_block,
)
finally:
skyvern_context.reset()
+ loop_mock.clean_up_kwargs = agent.clean_up_task.await_args.kwargs if agent.clean_up_task.await_args else {}
+ loop_mock.update_task_kwargs = agent.update_task.await_args.kwargs if agent.update_task.await_args else {}
return out_step, out_task, loop_mock, post_step_mock
@@ -168,7 +215,7 @@ async def test_execute_task_v3_no_actions_bills_nothing(monkeypatch: pytest.Monk
@pytest.mark.asyncio
async def test_execute_task_v3_failure_maps_to_failed(monkeypatch: pytest.MonkeyPatch) -> None:
- outcome = LoopOutcome(status="budget_exhausted", reason="max_turns reached", billable_actions=["click"])
+ outcome = LoopOutcome(status="budget_exhausted", reason="max_turns reached", billable_actions=[])
step, task, _loop, post_step_mock = await _run_execute_task_v3(monkeypatch, outcome)
assert step.status == StepStatus.failed
@@ -176,6 +223,25 @@ async def test_execute_task_v3_failure_maps_to_failed(monkeypatch: pytest.Monkey
post_step_mock.assert_awaited_once()
+async def test_execute_task_v3_failed_run_with_real_actions_completes_step_for_billing(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # This one step is the run's billing unit and post-step billing meters only completed steps:
+ # a budget-exhausted run that performed real page actions must still bill them, while the
+ # task-level status keeps reporting the failure. A canceled run stays unbilled.
+ outcome = LoopOutcome(status="budget_exhausted", reason="cap", billable_actions=["click", "type"])
+ step, task, _loop, post_step_mock = await _run_execute_task_v3(monkeypatch, outcome)
+ assert task.status == TaskStatus.failed
+ assert step.status == StepStatus.completed
+ billed_step = post_step_mock.await_args.args[1]
+ assert billed_step.status == StepStatus.completed
+
+ canceled = LoopOutcome(status="canceled", reason="canceled", billable_actions=["click"])
+ step, task, _loop, _post = await _run_execute_task_v3(monkeypatch, canceled)
+ assert step.status == StepStatus.canceled
+
+
@pytest.mark.asyncio
async def test_execute_task_v3_completed_without_extraction_fails(monkeypatch: pytest.MonkeyPatch) -> None:
# Completed browsing but no extracted_output for the extraction goal: report failure rather
@@ -187,7 +253,9 @@ async def test_execute_task_v3_completed_without_extraction_fails(monkeypatch: p
data_extraction_goal="Extract the confirmation number",
extracted_information_schema=None,
)
- assert step.status == StepStatus.failed
+ # The task-level result is the failure; the step (billing unit) completes because a real
+ # billable action ran.
+ assert step.status == StepStatus.completed
assert task.status == TaskStatus.failed
@@ -580,8 +648,8 @@ async def test_execute_task_v3_persists_per_action_screenshots_and_rows(monkeypa
outcome = LoopOutcome(status="completed", reason="done", billable_actions=["click", "type", "click"])
rounds = [
- [("click", {"selector": "#a"}), ("type", {"selector": "#b", "text": "x"})],
- [("click", {"selector": "#submit"})],
+ [("click", {"selector": "#a"}, True), ("type", {"selector": "#b", "text": "x"}, True)],
+ [("click", {"selector": "#submit"}, True)],
]
step, task, _loop, _post = await _run_execute_task_v3(
monkeypatch,
@@ -614,7 +682,7 @@ async def test_execute_task_v3_persists_action_row_when_screenshot_fails(monkeyp
step, task, _loop, _post = await _run_execute_task_v3(
monkeypatch,
outcome,
- action_rounds=[[("click", {"selector": "#a"})]],
+ action_rounds=[[("click", {"selector": "#a"}, True)]],
screenshot_raises=True,
data_extraction_goal=None,
extracted_information_schema=None,
@@ -711,6 +779,642 @@ async def test_execute_step_v3_standalone_flushes_llm_artifacts(cancelled: bool)
assert step.step_id not in manager._step_archives
+# ---------------------------------------------------------------------------
+# P2: the v3 dispatch gate for workflow task blocks (_task_block_supports_v3
+# and its wiring into ForgeAgent.execute_step)
+# ---------------------------------------------------------------------------
+
+
+def _make_output_parameter(key: str) -> OutputParameter:
+ now = datetime.now(UTC)
+ return OutputParameter(
+ parameter_type=ParameterType.OUTPUT,
+ key=key,
+ description="test output",
+ output_parameter_id=f"op_{key}",
+ workflow_id="w_test",
+ created_at=now,
+ modified_at=now,
+ )
+
+
+def _make_block(block_cls: type[BaseTaskBlock], label: str = "blk", **overrides: Any) -> BaseTaskBlock:
+ return block_cls(label=label, output_parameter=_make_output_parameter(label), **overrides)
+
+
+def _make_credential_parameter(key: str) -> CredentialParameter:
+ now = datetime.now(UTC)
+ return CredentialParameter(
+ key=key,
+ credential_parameter_id=f"cp_{key}",
+ workflow_id="w_test",
+ credential_id=f"cred_{key}",
+ created_at=now,
+ modified_at=now,
+ )
+
+
+_ALLOWED_BLOCK_CASES: list[tuple[type[BaseTaskBlock], dict[str, Any]]] = [
+ (TaskBlock, {}),
+ (NavigationBlock, {"navigation_goal": "Apply to the job"}),
+ (LoginBlock, {}),
+ (ActionBlock, {}),
+ (ValidationBlock, {}),
+ (ExtractionBlock, {"data_extraction_goal": "Extract the price"}),
+]
+_ALLOWED_BLOCK_IDS = ["task", "navigation", "login", "action", "validation", "extraction"]
+
+
[email protected]("block_cls,overrides", _ALLOWED_BLOCK_CASES, ids=_ALLOWED_BLOCK_IDS)
+def test_task_block_supports_v3_allows_supported_block_types(
+ block_cls: type[BaseTaskBlock], overrides: dict[str, Any]
+) -> None:
+ assert agent_module._task_block_supports_v3(_make_block(block_cls, **overrides)) is True
+
+
+def test_task_block_supports_v3_denies_unsupported_block_type() -> None:
+ # HUMAN_INTERACTION is a BaseTaskBlock subclass but not in the v3 allow-list.
+ assert agent_module._task_block_supports_v3(_make_block(HumanInteractionBlock)) is False
+
+
+ "overrides",
+ [
+ {"complete_on_download": True},
+ {"download_suffix": "invoice"},
+ {"download_timeout": 5.0},
+ ],
+ ids=["complete_on_download", "download_suffix", "download_timeout"],
+)
+def test_task_block_supports_v3_denies_download_semantics(overrides: dict[str, Any]) -> None:
+ assert agent_module._task_block_supports_v3(_make_block(ActionBlock, **overrides)) is False
+
+
+class _StepEngineDispatched(BaseException):
+ """Raised by the mocked agent_step to prove the gate fell through to the step engine.
+
+ Subclasses BaseException (not Exception) so execute_step's internal `except Exception`
+ handlers can't swallow it; it must propagate straight out to the test.
+ """
+
+
+async def _run_execute_step_gate(
+ *,
+ engine: agent_module.RunEngine,
+ task_block: BaseTaskBlock | None,
+ **task_overrides: Any,
+) -> tuple[AsyncMock, AsyncMock]:
+ """Drive ForgeAgent.execute_step through the v3 dispatch gate.
+
+ Returns (mocked _execute_task_v3, mocked agent_step). agent_step is a terminal probe that
+ raises a sentinel on call, so a fallthrough is detected without simulating its full body.
+ """
+ agent = ForgeAgent()
+ now = datetime.now(UTC)
+ organization = make_organization(now)
+ task = make_task(now, organization, data_extraction_goal=None, extracted_information_schema=None, **task_overrides)
+ step = make_step(now, task, step_id="step-gate", status=StepStatus.created, order=0, output=None)
+ browser_state, _, _ = make_browser_state()
+ browser_state.get_working_page = AsyncMock(return_value=None)
+
+ v3_mock = AsyncMock(return_value=(step, task))
+ step_engine_mock = AsyncMock(side_effect=_StepEngineDispatched)
+ agent._execute_task_v3 = v3_mock # type: ignore[method-assign]
+ agent.agent_step = step_engine_mock # type: ignore[method-assign]
+ agent.initialize_execution_state = AsyncMock(return_value=(step, browser_state, None)) # type: ignore[method-assign]
+
+ context = SkyvernContext(task_id=task.task_id, step_id=step.step_id, organization_id=task.organization_id)
+ skyvern_context.set(context)
+ try:
+ with patch("skyvern.forge.agent.app") as mock_app:
+ mock_app.DATABASE.tasks.get_task = AsyncMock(return_value=None)
+ mock_app.DATABASE.tasks.update_task = AsyncMock()
+ mock_app.AGENT_FUNCTION.validate_step_execution = AsyncMock()
+ mock_app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached = AsyncMock(return_value=False)
+ mock_app.ARTIFACT_MANAGER.flush_step_archive = AsyncMock()
+ try:
+ await agent.execute_step(
+ organization=organization,
+ task=task,
+ step=step,
+ engine=engine,
+ task_block=task_block,
+ download_baseline_files=[],
+ )
+ except _StepEngineDispatched:
+ pass
+ finally:
+ skyvern_context.reset()
+ return v3_mock, step_engine_mock
+
+
[email protected]("block_cls,overrides", _ALLOWED_BLOCK_CASES, ids=_ALLOWED_BLOCK_IDS)
+async def test_execute_step_dispatches_supported_block_types_to_v3(
+ block_cls: type[BaseTaskBlock], overrides: dict[str, Any]
+) -> None:
+ block = _make_block(block_cls, **overrides)
+ v3_mock, step_engine_mock = await _run_execute_step_gate(engine=agent_module.RunEngine.skyvern_v3, task_block=block)
+ v3_mock.assert_awaited_once()
+ assert v3_mock.await_args.kwargs["task_block"] is block
+ step_engine_mock.assert_not_awaited()
+
+
+ "overrides",
+ [
+ {"complete_on_download": True},
+ {"download_suffix": "invoice"},
+ {"download_timeout": 5.0},
+ ],
+ ids=["complete_on_download", "download_suffix", "download_timeout"],
+)
+async def test_execute_step_falls_through_to_step_engine_on_download_semantics(overrides: dict[str, Any]) -> None:
+ block = _make_block(ActionBlock, **overrides)
+ v3_mock, step_engine_mock = await _run_execute_step_gate(engine=agent_module.RunEngine.skyvern_v3, task_block=block)
+ v3_mock.assert_not_awaited()
+ step_engine_mock.assert_awaited_once()
+
+
+async def test_execute_step_falls_through_to_step_engine_on_unsupported_block_type() -> None:
+ block = _make_block(HumanInteractionBlock)
+ v3_mock, step_engine_mock = await _run_execute_step_gate(engine=agent_module.RunEngine.skyvern_v3, task_block=block)
+ v3_mock.assert_not_awaited()
+ step_engine_mock.assert_awaited_once()
+
+
+async def test_execute_step_v1_engine_block_unaffected() -> None:
+ # A v1-engine run always falls to the step engine, regardless of whether the block type
+ # would otherwise be v3-eligible.
+ block = _make_block(TaskBlock)
+ v3_mock, step_engine_mock = await _run_execute_step_gate(engine=agent_module.RunEngine.skyvern_v1, task_block=block)
+ v3_mock.assert_not_awaited()
+ step_engine_mock.assert_awaited_once()
+
+
+async def test_execute_step_bare_task_dispatch_unchanged() -> None:
+ v3_mock, step_engine_mock = await _run_execute_step_gate(engine=agent_module.RunEngine.skyvern_v3, task_block=None)
+ v3_mock.assert_awaited_once()
+ assert v3_mock.await_args.kwargs["task_block"] is None
+ step_engine_mock.assert_not_awaited()
+
+
+# ---------------------------------------------------------------------------
+# P3: block-true budgets, task_type-aware goal framing, workflow-cancel detection
+# ---------------------------------------------------------------------------
+
+
+async def test_execute_task_v3_block_task_step_cap_not_floored(monkeypatch: pytest.MonkeyPatch) -> None:
+ # A block task's configured cap is used as-is, not floored to MIN_ACTION_STEPS: a workflow
+ # author already sizes this budget deliberately, same as they do for the step engine.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=["click"])
+ block = _make_block(ActionBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ max_steps_per_run=2,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.await_args.kwargs["max_action_steps"] == 2
+
+
+async def test_execute_task_v3_bare_task_step_cap_still_floored(monkeypatch: pytest.MonkeyPatch) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=["click"])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, max_steps_per_run=2, data_extraction_goal=None, extracted_information_schema=None
+ )
+ assert loop_mock.await_args.kwargs["max_action_steps"] == MIN_ACTION_STEPS
+
+
+async def test_execute_task_v3_validation_block_goal_has_assessment_guidance(monkeypatch: pytest.MonkeyPatch) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ValidationBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ task_type=TaskType.validation,
+ complete_criterion="the confirmation banner is shown",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "assessment task" in goal
+ assert "do not modify page state" in goal
+ assert "no further page perception" not in goal
+
+
+async def test_execute_task_v3_validation_without_page_information_adds_guidance(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ValidationBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ task_type=TaskType.validation,
+ validation_without_page_information=True,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "page-free assessment" in goal
+ assert "Do not call observe or get_html" in goal
+
+
+async def test_execute_task_v3_action_block_goal_has_single_action_guidance(monkeypatch: pytest.MonkeyPatch) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ task_type=TaskType.action,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "single, focused action" in goal
+
+
+async def test_execute_task_v3_general_block_task_goal_has_no_framing(monkeypatch: pytest.MonkeyPatch) -> None:
+ # task_type=general (the default) gets no task-type framing, even for a block task.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "assessment task" not in goal
+ assert "single, focused action" not in goal
+
+
+async def test_execute_task_v3_should_cancel_true_when_workflow_run_canceled(monkeypatch: pytest.MonkeyPatch) -> None:
+ # A workflow task must also stop when its parent run is canceled, not just the task row
+ # itself (mirrors the legacy step-engine check).
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.tasks.get_task",
+ AsyncMock(return_value=SimpleNamespace(status=TaskStatus.running)),
+ )
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.workflow_runs.get_workflow_run",
+ AsyncMock(return_value=SimpleNamespace(status=WorkflowRunStatus.canceled)),
+ )
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ workflow_run_id="wr_cancel_test",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ should_cancel = loop_mock.await_args.kwargs["should_cancel"]
+ assert await should_cancel() is True
+
+
+async def test_execute_task_v3_should_cancel_fails_open_on_workflow_read_error(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # A transient DB error on the parent-run poll must not raise out of the loop (which the
+ # execute_step catch-all would convert into a failed task) — it means "don't cancel yet".
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.tasks.get_task",
+ AsyncMock(return_value=SimpleNamespace(status=TaskStatus.running)),
+ )
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.workflow_runs.get_workflow_run",
+ AsyncMock(side_effect=ConnectionError("db blip")),
+ )
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ workflow_run_id="wr_cancel_test",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ should_cancel = loop_mock.await_args.kwargs["should_cancel"]
+ assert await should_cancel() is False
+
+
+async def test_execute_task_v3_should_cancel_skips_workflow_read_for_bare_task(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # No workflow_run_id -> the extra workflow-run read never happens, even if it would say
+ # canceled -- the extra read is only paid for workflow tasks.
+ workflow_run_mock = AsyncMock(return_value=SimpleNamespace(status=WorkflowRunStatus.canceled))
+ monkeypatch.setattr("skyvern.forge.agent.app.DATABASE.workflow_runs.get_workflow_run", workflow_run_mock)
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.tasks.get_task",
+ AsyncMock(return_value=SimpleNamespace(status=TaskStatus.running)),
+ )
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, workflow_run_id=None, data_extraction_goal=None, extracted_information_schema=None
+ )
+ should_cancel = loop_mock.await_args.kwargs["should_cancel"]
+ assert await should_cancel() is False
+ workflow_run_mock.assert_not_awaited()
+
+
+# ---------------------------------------------------------------------------
+# P4: the page provider (live re-resolution for workflow blocks, once for bare tasks)
+# ---------------------------------------------------------------------------
+
+
+async def test_execute_task_v3_bare_task_provider_resolves_page_once(monkeypatch: pytest.MonkeyPatch) -> None:
+ # A bare task must preserve today's exact semantics: must_get_working_page grabs the page once
+ # up front, and every later provider call returns that same object, not a re-resolved one.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ provider_probe_calls=3,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.resolved_pages == [loop_mock.resolved_pages[0]] * 3
+ loop_mock.browser_state.must_get_working_page.assert_awaited_once()
+ # The completion gate reads the page once on a completed outcome; the PROVIDER itself never
+ # consults get_working_page for a bare task.
+ assert loop_mock.browser_state.get_working_page.await_count <= 1
+
+
+async def test_execute_task_v3_workflow_provider_resolves_live_working_page(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # A workflow block's provider must re-acquire the working page on every call through the
+ # recovering accessor (must_get_working_page), so a popup/new tab is followed and a crashed
+ # page gets a reopen attempt, matching the step engine's per-action re-acquisition.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ probe, page_a, page_b, page_c = MagicMock(), MagicMock(), MagicMock(), MagicMock()
+ block = _make_block(ActionBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ provider_probe_calls=3,
+ must_get_working_page_side_effect=[probe, page_a, page_b, page_c],
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.resolved_pages == [page_a, page_b, page_c]
+ # 1 fail-fast start probe + 3 per-call resolutions, all through the recovering accessor.
+ assert loop_mock.browser_state.must_get_working_page.await_count == 4
+ # One get_working_page read comes from the completion gate, none from the provider.
+ assert loop_mock.browser_state.get_working_page.await_count <= 1
+
+
+async def test_execute_task_v3_workflow_block_fails_fast_when_page_gone_at_start(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # If the page is already lost at block start, the task must fail before any LLM turn is spent
+ # (parity with the pre-provider must_get_working_page raise), not grind to budget exhaustion.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock)
+ with pytest.raises(MissingBrowserStatePage):
+ await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ must_get_working_page_side_effect=MissingBrowserStatePage(),
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+
+
+# ---------------------------------------------------------------------------
+# P5: block-scoped credential TOTP disambiguation -- a block with exactly one
+# login-credential parameter pins active_credential_parameter_key for the loop's
+# duration (mirrors v1's handler.py get_actual_value_of_parameter_if_secret).
+# ---------------------------------------------------------------------------
+
+
+async def test_execute_task_v3_single_credential_sets_active_key_during_loop(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock, parameters=[_make_credential_parameter("cred_1")])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ initial_active_credential_parameter_key="pre_existing_key",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.active_credential_parameter_key_during_loop == "cred_1"
+ assert loop_mock.context.active_credential_parameter_key == "pre_existing_key"
+
+
+async def test_execute_task_v3_two_credential_params_leaves_active_key_untouched(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(
+ ActionBlock,
+ parameters=[_make_credential_parameter("cred_1"), _make_credential_parameter("cred_2")],
+ )
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ initial_active_credential_parameter_key="pre_existing_key",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.active_credential_parameter_key_during_loop == "pre_existing_key"
+ assert loop_mock.context.active_credential_parameter_key == "pre_existing_key"
+
+
+async def test_execute_task_v3_zero_credential_params_leaves_active_key_untouched(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ initial_active_credential_parameter_key="pre_existing_key",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.active_credential_parameter_key_during_loop == "pre_existing_key"
+ assert loop_mock.context.active_credential_parameter_key == "pre_existing_key"
+
+
+async def test_execute_task_v3_active_credential_key_restored_when_loop_raises(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock, parameters=[_make_credential_parameter("cred_1")])
+ with pytest.raises(RuntimeError, match="loop boom"):
+ await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ initial_active_credential_parameter_key="pre_existing_key",
+ loop_raises=RuntimeError("loop boom"),
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ from skyvern.forge.taskv3 import engine as engine_module
+
+ loop_mock = engine_module.run_task_v3_agent_loop
+ assert loop_mock.active_credential_parameter_key_during_loop == "cred_1"
+ assert loop_mock.context.active_credential_parameter_key == "pre_existing_key"
+
+
+async def test_execute_task_v3_threads_secret_resolver_for_block_tasks_only(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # Block tasks get fill-time placeholder resolution via the step engine's own helper; bare
+ # tasks keep typing the literal text (no workflow context to resolve against).
+ resolver_mock = MagicMock(return_value="real-value")
+ monkeypatch.setattr(
+ "skyvern.webeye.actions.handler.get_actual_value_of_parameter_if_secret_with_task",
+ resolver_mock,
+ )
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(ActionBlock)
+ _step, task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ resolve_typed_text = loop_mock.await_args.kwargs["resolve_typed_text"]
+ assert resolve_typed_text is not None
+ assert resolve_typed_text("placeholder_x") == "real-value"
+ resolver_mock.assert_called_once_with(task, "placeholder_x")
+
+ _step, _task, bare_loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert bare_loop_mock.await_args.kwargs["resolve_typed_text"] is None
+
+
+async def test_execute_task_v3_block_tasks_get_verify_first_preamble(monkeypatch: pytest.MonkeyPatch) -> None:
+ # Blocks resume mid-workflow: the goal must instruct verifying the criterion against full page
+ # text before acting, and forbid leaving the flow. Bare tasks get none of that.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(NavigationBlock, navigation_goal="Open the summary page")
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "ALREADY" in goal and "never sign out" in goal
+
+ _step, _task, bare_loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, data_extraction_goal=None, extracted_information_schema=None
+ )
+ assert "never sign out" not in bare_loop_mock.await_args.kwargs["goal"]
+
+
+async def test_execute_task_v3_should_cancel_detects_timed_out_reaper(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # The stuck-run reaper sets timed_out (not canceled) on both the run and its child tasks;
+ # the poll must stop the loop for either status on either axis.
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.tasks.get_task",
+ AsyncMock(return_value=SimpleNamespace(status=TaskStatus.timed_out)),
+ )
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, workflow_run_id="wr_reaped", data_extraction_goal=None, extracted_information_schema=None
+ )
+ assert await loop_mock.await_args.kwargs["should_cancel"]() is True
+
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.tasks.get_task",
+ AsyncMock(return_value=SimpleNamespace(status=TaskStatus.running)),
+ )
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.workflow_runs.get_workflow_run",
+ AsyncMock(return_value=SimpleNamespace(status=WorkflowRunStatus.timed_out)),
+ )
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, workflow_run_id="wr_reaped", data_extraction_goal=None, extracted_information_schema=None
+ )
+ assert await loop_mock.await_args.kwargs["should_cancel"]() is True
+
+
[email protected]("flavor", ["timed_out", "canceled"])
+async def test_execute_task_v3_keeps_externally_finalized_terminal_status(
+ monkeypatch: pytest.MonkeyPatch, flavor: str
+) -> None:
+ # An external finalizer (reaper -> timed_out, cancel API -> canceled) can win the race while
+ # the loop is stopping; the v3 finalization must keep that status instead of raising into the
+ # failure path. Webhook asymmetry matches v1: the cancel API already webhooks synchronously
+ # (suppress the duplicate), the reaper path does not (send).
+ from skyvern.exceptions import TaskAlreadyCanceled, TaskAlreadyTimeout
+
+ if flavor == "timed_out":
+ side_effect: BaseException = TaskAlreadyTimeout("tsk_reaped")
+ final_row = SimpleNamespace(status=TaskStatus.timed_out)
+ expect_webhook = True
+ else:
+ side_effect = TaskAlreadyCanceled("canceled", "tsk_reaped")
+ final_row = SimpleNamespace(status=TaskStatus.canceled)
+ expect_webhook = False
+ outcome = LoopOutcome(status="canceled", reason="run canceled", billable_actions=[])
+ monkeypatch.setattr(
+ "skyvern.forge.agent.app.DATABASE.tasks.get_task",
+ AsyncMock(return_value=final_row),
+ )
+ step, task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ update_task_side_effect=side_effect,
+ workflow_run_id="wr_reaped",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert task is final_row
+ assert loop_mock.clean_up_kwargs["need_call_webhook"] is expect_webhook
+
+
def test_redact_extracted_information_disambiguates_colliding_secret_keys() -> None:
result = agent_module._redact_extracted_information(
{"482913": "codeA", "735264": "codeB", "other": "safe"},
@@ -721,3 +1425,375 @@ def test_redact_extracted_information_disambiguates_colliding_secret_keys() -> N
"[REDACTED_SECRET]#2": "codeB",
"other": "safe",
}
+
+
+async def test_execute_task_v3_completion_gate_veto_fails_the_task(monkeypatch: pytest.MonkeyPatch) -> None:
+ # The deployment completion gate (e.g. a submit block requiring a deterministic confirmation)
+ # must be able to veto a v3 finish(completed); the veto fails safe instead of falsely completing.
+ outcome = LoopOutcome(status="completed", reason="looks done", billable_actions=["click"])
+ block = _make_block(NavigationBlock, navigation_goal="Submit the application")
+ _step, task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ completion_gate_vetoes=True,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert task.status == TaskStatus.failed
+ loop_mock.completion_gate.assert_awaited_once()
+
+ _step, task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert task.status == TaskStatus.completed
+ kwargs = loop_mock.completion_gate.await_args.kwargs
+ assert kwargs["task_block"] is block
+
+
+async def test_execute_task_v3_threads_workflow_system_prompt(monkeypatch: pytest.MonkeyPatch) -> None:
+ # A workflow-level system prompt carries customer behavioral/compliance instructions; the
+ # step engine passes it on every LLM call, so v3 must surface it in its system guidance.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(NavigationBlock, navigation_goal="Open the page")
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ workflow_system_prompt="Always use formal salutations.",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert "Always use formal salutations." in loop_mock.await_args.kwargs["extra_system_guidance"]
+
+
+async def test_execute_task_v3_page_free_validation_prompt_has_no_perception_instructions(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # without_page_information validations judge only durable inputs; the goal must not
+ # simultaneously instruct reading the page (the contradiction codex flagged).
+ outcome = LoopOutcome(status="completed", reason="ok", billable_actions=[])
+ block = _make_block(ValidationBlock, complete_criterion="The data is consistent")
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ validation_without_page_information=True,
+ task_type=TaskType.validation,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "page-free assessment" in goal
+ # No perception INSTRUCTIONS: neither the verify-first preamble nor the grounding clause
+ # (the page-free text itself may name the tools only to forbid them).
+ assert "First read" not in goal
+ assert "read the full page text (get_html) before concluding" not in goal
+ assert "Do not call observe or get_html" in goal
+
+
+async def test_execute_task_v3_actions_are_round_stamped(monkeypatch: pytest.MonkeyPatch) -> None:
+ # Each action row carries its ROUND index in step_order, so the workflow-run step budget
+ # counts v3 rounds exactly (distinct (task, order) pairs across steps and actions).
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=["type", "type", "click"])
+ rounds = [
+ [("type", {"selector": "#a"}, True), ("type", {"selector": "#b"}, True)],
+ [("click", {"selector": "#go"}, True)],
+ ]
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, action_rounds=rounds, data_extraction_goal=None, extracted_information_schema=None
+ )
+ create_action = agent_module.app.DATABASE.workflow_params.create_action
+ stamped = [(c.kwargs["action"].step_order, c.kwargs["action"].action_order) for c in create_action.await_args_list]
+ assert stamped == [(0, 0), (0, 1), (1, 2)]
+
+
+async def test_execute_task_v3_workflow_run_step_budget_caps_and_blocks(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # The org-wide workflow-run step ceiling binds v3 blocks: remaining budget caps the action
+ # rounds, and an exhausted budget fails the block before any LLM turn is spent.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(NavigationBlock, navigation_goal="Go", max_steps_per_run=10)
+ monkeypatch.setattr(
+ ForgeAgent,
+ "_check_workflow_run_step_budget",
+ AsyncMock(return_value=(47, 50)),
+ )
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ workflow_run_id="wr_budget",
+ max_steps_per_run=10,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ # 47 counted includes this block's own fresh placeholder step; credited back -> 50-46=4.
+ # 47 counted includes this block's own fresh placeholder step; credited back -> 50-46=4.
+ assert loop_mock.await_args.kwargs["max_action_steps"] == 4
+
+ monkeypatch.setattr(
+ ForgeAgent,
+ "_check_workflow_run_step_budget",
+ AsyncMock(return_value=(51, 50)),
+ )
+ step, task, exhausted_loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ workflow_run_id="wr_budget",
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ exhausted_loop_mock.assert_not_awaited()
+ assert task.status == TaskStatus.failed
+ assert "maximum steps" in (task.failure_reason or "")
+
+
+async def test_execute_task_v3_detects_user_defined_errors_on_failure(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # error_code_mapping workflows consume configured codes on failure; v3 must run the same
+ # detection the step engine does before finalizing failed/terminated outcomes.
+ detected = [SimpleNamespace(model_dump=lambda: {"error_code": "payment_failed"}, error_code="payment_failed")]
+ detect_mock = AsyncMock(return_value=detected)
+ monkeypatch.setattr("skyvern.forge.agent.detect_user_defined_errors_for_task", detect_mock)
+ errors_update = AsyncMock()
+ monkeypatch.setattr("skyvern.forge.agent.app.DATABASE.tasks.update_task", errors_update)
+ outcome = LoopOutcome(status="terminated", reason="blocked by portal", billable_actions=[])
+ block = _make_block(NavigationBlock, navigation_goal="Go", error_code_mapping={"payment_failed": "declined"})
+ await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ error_code_mapping={"payment_failed": "declined"},
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ detect_mock.assert_awaited_once()
+ assert errors_update.await_args.kwargs["errors"] == [{"error_code": "payment_failed"}]
+
+ detect_mock.reset_mock()
+ completed = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ await _run_execute_task_v3(
+ monkeypatch,
+ completed,
+ task_block=block,
+ error_code_mapping={"payment_failed": "declined"},
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ detect_mock.assert_not_awaited()
+
+
+async def test_execute_task_v3_router_selected_data_only_validation_goes_page_free(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # The validation evidence router can select data-only mode even when the block does not set
+ # without_page_information; v3 must honor it like v1 does (and stay page-aware on router error).
+ router_result = SimpleNamespace(effective_without_page_information=True)
+ monkeypatch.setattr("skyvern.forge.agent.resolve_validation_evidence_route", AsyncMock(return_value=router_result))
+ outcome = LoopOutcome(status="completed", reason="ok", billable_actions=[])
+ block = _make_block(ValidationBlock, complete_criterion="The totals match")
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ task_type=TaskType.validation,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert "page-free assessment" in loop_mock.await_args.kwargs["goal"]
+
+ monkeypatch.setattr(
+ "skyvern.forge.agent.resolve_validation_evidence_route", AsyncMock(side_effect=RuntimeError("router down"))
+ )
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ task_type=TaskType.validation,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ goal = loop_mock.await_args.kwargs["goal"]
+ assert "page-free assessment" not in goal
+ assert "read the full page text (get_html) before concluding" in goal
+
+
+async def test_execute_task_v3_pins_credential_before_building_auth_tools(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # The tool-offer gate consults credential candidates; built before the pin, a multi-credential
+ # context looks ambiguous and get_verification_code is never offered. The pin must be active
+ # when build_auth_tools runs.
+ seen_keys: list[str | None] = []
+
+ def capturing_build(task: Any) -> tuple[list[Any], str]:
+ ctx = skyvern_context.current()
+ seen_keys.append(ctx.active_credential_parameter_key if ctx else None)
+ return [], ""
+
+ monkeypatch.setattr("skyvern.forge.taskv3.auth_tools.build_auth_tools", capturing_build)
+ monkeypatch.setattr("skyvern.forge.agent.build_auth_tools", capturing_build, raising=False)
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(LoginBlock, parameters=[_make_credential_parameter("MyCreds")])
+ await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert seen_keys == ["MyCreds"]
+
+
+async def test_execute_task_v3_failed_round_persists_failed_action_row(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # A dispatched round that errored still consumed budget: its row persists with status=failed
+ # and its round index, so later blocks count it against the workflow-run ceiling.
+ outcome = LoopOutcome(status="budget_exhausted", reason="cap", billable_actions=[])
+ rounds = [[("click", {"selector": "#x"}, False)]]
+ await _run_execute_task_v3(
+ monkeypatch, outcome, action_rounds=rounds, data_extraction_goal=None, extracted_information_schema=None
+ )
+ create_action = agent_module.app.DATABASE.workflow_params.create_action
+ action = create_action.await_args.kwargs["action"]
+ assert action.status == ActionStatus.failed
+ assert action.step_order == 0
+
+
+async def test_execute_task_v3_page_free_validation_threads_page_free_flag(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="ok", billable_actions=[])
+ block = _make_block(ValidationBlock, complete_criterion="The data is consistent")
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ validation_without_page_information=True,
+ task_type=TaskType.validation,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.await_args.kwargs["page_free"] is True
+
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ assert loop_mock.await_args.kwargs["page_free"] is False
+
+
+async def test_execute_task_v3_recordable_round_persists_without_budget_unit(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # navigate/scroll/wait persist as action rows with screenshots (artifact parity) but never
+ # consume a workflow-run budget unit: their rows keep the current round index.
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=["click"])
+ rounds = [
+ [("navigate", {"url": "https://a.test"}, True)],
+ [("click", {"selector": "#go"}, True)],
+ [("scroll", {"amount": 500}, True)],
+ ]
+ await _run_execute_task_v3(
+ monkeypatch, outcome, action_rounds=rounds, data_extraction_goal=None, extracted_information_schema=None
+ )
+ create_action = agent_module.app.DATABASE.workflow_params.create_action
+ stamped = [(c.kwargs["action"].action_type, c.kwargs["action"].step_order) for c in create_action.await_args_list]
+ assert stamped == [
+ (ActionType.GOTO_URL, 0),
+ (ActionType.CLICK, 0),
+ (ActionType.SCROLL, 1),
+ ]
+
+
+async def test_execute_task_v3_failed_run_carries_failure_category(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # fail_task records a code-level failure classification; v3's direct finalization must too.
+ outcome = LoopOutcome(status="budget_exhausted", reason="Reached the maximum steps (2)", billable_actions=[])
+ _step, task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, data_extraction_goal=None, extracted_information_schema=None
+ )
+ assert task.status == TaskStatus.failed
+ update_kwargs = loop_mock.update_task_kwargs
+ assert update_kwargs.get("failure_category")
+
+
+async def test_execute_task_v3_settle_completion_fenced_to_block_tasks(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(NavigationBlock, navigation_goal="Open the panel")
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, task_block=block, data_extraction_goal=None, extracted_information_schema=None
+ )
+ probe = loop_mock.await_args.kwargs["settle_probe"]
+ assert probe is not None
+
+ _step, _task, bare_loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch, outcome, data_extraction_goal=None, extracted_information_schema=None
+ )
+ assert bare_loop_mock.await_args.kwargs["settle_probe"] is None
+
+
+async def test_execute_task_v3_settle_probe_peeks_without_recovery(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # The probe peeks with the NON-recovering accessor: a lost page settles (accept the verdict)
+ # rather than triggering recovery navigation at finish time; a mid-render page defers.
+ monkeypatch.setattr("skyvern.forge.agent.asyncio.sleep", AsyncMock(return_value=None))
+ outcome = LoopOutcome(status="completed", reason="done", billable_actions=[])
+ block = _make_block(NavigationBlock, navigation_goal="Open the panel")
+
+ page = MagicMock()
+ page.evaluate = AsyncMock(side_effect=["100:10", "180:14", "180:14", "180:14"])
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ get_working_page_side_effect=[page, page, page, page],
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ probe = loop_mock.await_args.kwargs["settle_probe"]
+ assert await probe() is False
+ assert await probe() is True
+ loop_mock.browser_state.get_working_page.assert_awaited()
+
+ lost_state_probe_mock = AsyncMock(return_value=None)
+ _step, _task, loop_mock, _post = await _run_execute_task_v3(
+ monkeypatch,
+ outcome,
+ task_block=block,
+ data_extraction_goal=None,
+ extracted_information_schema=None,
+ )
+ loop_mock.browser_state.get_working_page = lost_state_probe_mock
+ probe = loop_mock.await_args.kwargs["settle_probe"]
+ assert await probe() is True
+ lost_state_probe_mock.assert_awaited_once()
diff --git a/tests/unit/test_api_handler_factory.py b/tests/unit/test_api_handler_factory.py
index 85b6cd442..fa132439c 100644
--- a/tests/unit/test_api_handler_factory.py
+++ b/tests/unit/test_api_handler_factory.py
@@ -2412,3 +2412,123 @@ def test_llmcaller_router_is_cached_across_instances(monkeypatch: pytest.MonkeyP
assert first._router is second._router
assert len(build_calls) == 1
+
+
+def _luna_xhigh_flex_fallback_router(*, fallback_deployment_model: str = "gpt-5.6-luna") -> LLMRouterConfig:
+ return LLMRouterConfig(
+ model_name="openai-gpt-5-6-luna-xhigh-flex-fallback-router",
+ required_env_vars=[],
+ supports_vision=True,
+ add_assistant_prefix=False,
+ model_list=[
+ LLMRouterModelConfig(
+ model_name="openai-gpt-5-6-luna-xhigh-flex",
+ litellm_params={"model": "gpt-5.6-luna"},
+ ),
+ LLMRouterModelConfig(
+ model_name="openai-gpt-5-6-luna-xhigh-fallback",
+ litellm_params={"model": fallback_deployment_model},
+ ),
+ ],
+ main_model_group="openai-gpt-5-6-luna-xhigh-flex",
+ fallback_model_group="openai-gpt-5-6-luna-xhigh-fallback",
+ )
+
+
+def test_supports_tool_choice_resolves_router_through_its_deployments(monkeypatch: pytest.MonkeyPatch) -> None:
+ """The probe must resolve a router's tool_choice support through its deployments' underlying
+ litellm models, not the router's own group name -- litellm knows nothing about the latter."""
+ router_config = _luna_xhigh_flex_fallback_router()
+ monkeypatch.setattr(api_handler_factory.LLMConfigRegistry, "get_config", lambda _: router_config)
+
+ caller = LLMCaller("LUNA_XHIGH_FLEX_FALLBACK_ROUTER")
+
+ assert caller.supports_tool_choice() is True
+ # Pins why the probe must go through model_list: asking litellm about the router's own group
+ # name denies every router, which would make the feature a no-op on the model it targets.
+ assert litellm.utils.supports_tool_choice(model=router_config.model_name) is False
+
+
+def test_supports_tool_choice_denies_router_when_any_deployment_is_unsupported(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # litellm.Router validates every deployment's model string at construction time, so the
+ # "unsupported" deployment must be a real, recognized model (just one litellm knows doesn't
+ # take tool_choice) rather than a made-up string, which would blow up LLMCaller.__init__.
+ router_config = _luna_xhigh_flex_fallback_router(fallback_deployment_model="openai/gpt-3.5-turbo-instruct")
+ monkeypatch.setattr(api_handler_factory.LLMConfigRegistry, "get_config", lambda _: router_config)
+
+ caller = LLMCaller("LUNA_XHIGH_FLEX_FALLBACK_ROUTER_PARTIAL")
+
+ assert caller.supports_tool_choice() is False
+
+
+def test_supports_tool_choice_follows_dispatch_order_for_anthropic_keys(monkeypatch: pytest.MonkeyPatch) -> None:
+ # A router-backed key dispatches through litellm.Router, which forwards tool_choice, even when
+ # its name contains ANTHROPIC. Denying on the substring alone would silently disable the lever.
+ router_config = _luna_xhigh_flex_fallback_router()
+ monkeypatch.setattr(api_handler_factory.LLMConfigRegistry, "get_config", lambda _: router_config)
+ monkeypatch.setattr(api_handler_factory, "_LLMCALLER_ROUTER_CACHE", {})
+ monkeypatch.setattr(api_handler_factory, "_build_litellm_router", lambda cfg: MagicMock())
+
+ assert LLMCaller("BEDROCK_ANTHROPIC_CLAUDE5_OPUS_WITH_FALLBACK").supports_tool_choice() is True
+
+ # A direct ANTHROPIC key reaches _call_anthropic, which builds its provider kwargs from an
+ # explicit allowlist and would discard the parameter while the run still reported it applied.
+ direct_config = LLMConfig(
+ model_name="anthropic/claude-sonnet-4-6",
+ required_env_vars=[],
+ supports_vision=True,
+ add_assistant_prefix=False,
+ )
+ monkeypatch.setattr(api_handler_factory.LLMConfigRegistry, "get_config", lambda _: direct_config)
+ monkeypatch.setattr(api_handler_factory.skyvern_context, "current", lambda: None)
+
+ assert LLMCaller("ANTHROPIC_CLAUDE4.6_SONNET").supports_tool_choice() is False
+
+
+def test_supports_tool_choice_denies_unrecognized_direct_model(monkeypatch: pytest.MonkeyPatch) -> None:
+ llm_config = _custom_llm_config("not-a-real-model-xyz")
+ monkeypatch.setattr(api_handler_factory.LLMConfigRegistry, "get_config", lambda _: llm_config)
+
+ caller = LLMCaller("UNRECOGNIZED_DIRECT_MODEL")
+
+ assert caller.supports_tool_choice() is False
+
+
+async def test_call_drops_tool_choice_the_model_cannot_take(monkeypatch: pytest.MonkeyPatch) -> None:
+ # The shared helper hardcodes model_name="gpt-4" and patches get_config, so the "supported"
+ # arm cannot reuse it and is built inline against a real tool_choice-capable model.
+ caller, _ = _stub_successful_llm_caller(monkeypatch)
+ monkeypatch.setattr(caller, "supports_tool_choice", lambda: False)
+
+ await caller.call(prompt="test", prompt_name="taskv3-agent-loop", tool_choice="required")
+
+ dispatch_kwargs = caller._dispatch_llm_call.await_args.kwargs
+ assert "tool_choice" not in dispatch_kwargs
+
+ supported_llm_config = LLMConfig(
+ model_name="gpt-4.1",
+ required_env_vars=[],
+ supports_vision=False,
+ add_assistant_prefix=False,
+ )
+ monkeypatch.setattr(api_handler_factory.LLMConfigRegistry, "get_config", lambda _: supported_llm_config)
+ monkeypatch.setattr(api_handler_factory.skyvern_context, "current", lambda: None)
+ monkeypatch.setattr(
+ api_handler_factory,
+ "llm_messages_builder_with_history",
+ AsyncMock(return_value=[{"role": "user", "content": "test"}]),
+ )
+ supported_caller = LLMCaller("TEST_LLM_CALLER_SUPPORTED_TOOL_CHOICE")
+ monkeypatch.setattr(supported_caller, "_dispatch_llm_call", AsyncMock(return_value=FakeLLMResponse("gpt-4.1")))
+ monkeypatch.setattr(api_handler_factory, "parse_api_response", lambda *args: {"actions": []})
+ artifact_manager = MagicMock()
+ artifact_manager.bulk_create_artifacts = AsyncMock()
+ monkeypatch.setattr(api_handler_factory.app, "ARTIFACT_MANAGER", artifact_manager)
+
+ await supported_caller.call(prompt="test", prompt_name="taskv3-agent-loop", tool_choice="required")
+
+ supported_dispatch_kwargs = supported_caller._dispatch_llm_call.await_args.kwargs
+ assert supported_dispatch_kwargs["tool_choice"] == "required"
diff --git a/tests/unit/test_browser_effect_sink_enumeration.py b/tests/unit/test_browser_effect_sink_enumeration.py
index fed2fef4f..fb800fe94 100644
--- a/tests/unit/test_browser_effect_sink_enumeration.py
+++ b/tests/unit/test_browser_effect_sink_enumeration.py
@@ -15,7 +15,7 @@ _CANDIDATE_METHODS = frozenset(
)
_DISCOVERED_BROWSER_API_CALLS = {
- "skyvern/forge/agent.py": Counter({"new_page": 1}),
+ "skyvern/forge/agent.py": Counter({"evaluate": 2, "new_page": 1}),
"skyvern/forge/agent_functions.py": Counter({"close": 1, "scroll_into_view_if_needed": 1}),
"skyvern/webeye/actions/handler.py": Counter(
{
@@ -71,6 +71,8 @@ _DISCOVERED_BROWSER_API_CALLS = {
}
_EVALUATE_CALLERS = {
+ # Read-only DOM-shape probe for the v3 settle-before-complete check (two samples per probe).
+ "skyvern/forge/agent.py": Counter({"_settle_probe": 2}),
"skyvern/webeye/actions/handler.py": Counter(
{
"_blob_iframe_src_titles": 1,
@@ -207,21 +209,21 @@ def test_discovered_browser_api_lower_bound_is_stable() -> None:
}
assert observed == _DISCOVERED_BROWSER_API_CALLS
- assert sum(sum(methods.values()) for methods in observed.values()) == 151
+ assert sum(sum(methods.values()) for methods in observed.values()) == 153
handler_candidates = _candidate_signatures("skyvern/webeye/actions/handler.py", _CANDIDATE_METHODS)
classified_non_browser = Counter(
{signature: count for signature, count in handler_candidates.items() if signature in _NON_BROWSER_CANDIDATES}
)
assert classified_non_browser == _NON_BROWSER_CANDIDATES
assert sum(_NON_BROWSER_CANDIDATES.values()) == 5
- assert sum(sum(methods.values()) for methods in observed.values()) - sum(_NON_BROWSER_CANDIDATES.values()) == 146
+ assert sum(sum(methods.values()) for methods in observed.values()) - sum(_NON_BROWSER_CANDIDATES.values()) == 148
def test_every_raw_evaluate_call_is_classified() -> None:
observed = {path: callers for path in _owned_source_paths() if (callers := _callers_for_method(path, "evaluate"))}
assert observed == _EVALUATE_CALLERS
- assert sum(sum(callers.values()) for callers in observed.values()) == 22
+ assert sum(sum(callers.values()) for callers in observed.values()) == 24
def test_every_cdp_dispatch_is_classified_by_exact_command() -> None:
diff --git a/tests/unit/test_browser_session_timeouts.py b/tests/unit/test_browser_session_timeouts.py
index 9fe4a0f37..3a3a8c572 100644
--- a/tests/unit/test_browser_session_timeouts.py
+++ b/tests/unit/test_browser_session_timeouts.py
@@ -1,10 +1,16 @@
+from types import SimpleNamespace
+from unittest.mock import AsyncMock, MagicMock, patch
+
import pytest
+from fastapi import HTTPException
from pydantic import ValidationError
+from skyvern.forge.sdk.routes import browser_sessions as browser_sessions_routes
from skyvern.schemas.browser_session_timeouts import (
DEFAULT_TIMEOUT,
MAX_LIFETIME_SECONDS,
MAX_TIMEOUT,
+ MAX_TIMEOUT_EXCEEDED_MESSAGE,
MIN_TIMEOUT,
seconds_until_expiry,
session_is_active,
@@ -130,10 +136,46 @@ def test_session_is_active_matches_positive_remaining_time() -> None:
) is (remaining > 0)
-def test_requested_timeout_above_the_cap_is_clamped() -> None:
- # Callers that still send the old 24h ceiling get the cap, not a 422.
- assert CreateBrowserSessionRequest(timeout=1440).timeout == MAX_TIMEOUT
- assert CreateBrowserSessionRequest(timeout=MAX_TIMEOUT + 1).timeout == MAX_TIMEOUT
[email protected]("timeout", [MAX_TIMEOUT + 1, 1440])
+async def test_requested_timeout_above_the_cap_returns_400(timeout: int) -> None:
+ app_mock = MagicMock()
+ app_mock.PERSISTENT_SESSIONS_MANAGER.create_session = AsyncMock()
+
+ with patch.object(browser_sessions_routes, "app", app_mock):
+ with pytest.raises(HTTPException) as exc_info:
+ await browser_sessions_routes.create_browser_session(
+ CreateBrowserSessionRequest(timeout=timeout),
+ current_org=SimpleNamespace(organization_id="org_1"),
+ )
+
+ assert exc_info.value.status_code == 400
+ assert (
+ exc_info.value.detail
+ == "Longer browser durations are available on our enterprise plan, please contact [email protected]"
+ )
+ assert exc_info.value.detail == MAX_TIMEOUT_EXCEEDED_MESSAGE
+ app_mock.PERSISTENT_SESSIONS_MANAGER.create_session.assert_not_awaited()
+
+
+async def test_requested_timeout_at_the_cap_creates_the_session() -> None:
+ created_session = SimpleNamespace(persistent_browser_session_id="pbs_1")
+ app_mock = MagicMock()
+ app_mock.PERSISTENT_SESSIONS_MANAGER.create_session = AsyncMock(return_value=created_session)
+ from_browser_session = AsyncMock(return_value=SimpleNamespace(browser_session_id="pbs_1"))
+
+ with (
+ patch.object(browser_sessions_routes, "app", app_mock),
+ patch.object(browser_sessions_routes.BrowserSessionResponse, "from_browser_session", from_browser_session),
+ ):
+ await browser_sessions_routes.create_browser_session(
+ CreateBrowserSessionRequest(timeout=MAX_TIMEOUT),
+ current_org=SimpleNamespace(organization_id="org_1"),
+ )
+
+ app_mock.PERSISTENT_SESSIONS_MANAGER.create_session.assert_awaited_once()
+ assert app_mock.PERSISTENT_SESSIONS_MANAGER.create_session.await_args.kwargs["timeout_minutes"] == MAX_TIMEOUT
def test_requested_timeout_at_or_below_the_cap_is_preserved() -> None:
diff --git a/tests/unit/test_cleanup_browser_video_path_fallback.py b/tests/unit/test_cleanup_browser_video_path_fallback.py
index bc08d84a7..1a6fec1bd 100644
--- a/tests/unit/test_cleanup_browser_video_path_fallback.py
+++ b/tests/unit/test_cleanup_browser_video_path_fallback.py
@@ -328,6 +328,7 @@ async def test_cleanup_gates_har_and_console_redaction_on_run_gate(
context_manager = SimpleNamespace(
artifact_redaction_enabled=MagicMock(return_value=redaction_enabled),
get_secret_values_for_run=MagicMock(return_value={"console-secret"}),
+ runtime_secret_values_for_artifacts=MagicMock(return_value=set()),
)
with patch("skyvern.forge.agent.app") as mock_app:
@@ -355,6 +356,44 @@ async def test_cleanup_gates_har_and_console_redaction_on_run_gate(
assert b"console-secret" not in stored_console_log
context_manager.get_secret_values_for_run.assert_called_once_with("wr_1")
else:
+ # Opted-out with no runtime secrets registered: bytes pass through, and only the
+ # runtime floor (not the gated per-run set) was consulted.
assert stored_har == har_data
assert stored_console_log == console_log
context_manager.get_secret_values_for_run.assert_not_called()
+ context_manager.runtime_secret_values_for_artifacts.assert_called_once()
+
+
+async def test_cleanup_floors_runtime_secret_when_opted_out() -> None:
+ # A runtime-resolved code must not survive into task HAR/console even without the
+ # per-run Mask-Secrets opt-in.
+ har_data = json.dumps(
+ {"log": {"entries": [{"request": {"headers": [{"name": "X-Code", "value": "code 424242"}]}}]}}
+ ).encode()
+ console_log = b"typed code 424242"
+ task = _make_task(workflow_run_id="wr_1")
+ browser_state = _browser_state()
+ context_manager = SimpleNamespace(
+ artifact_redaction_enabled=MagicMock(return_value=False),
+ get_secret_values_for_run=MagicMock(side_effect=AssertionError("gated set must not be consulted")),
+ runtime_secret_values_for_artifacts=MagicMock(return_value={"424242"}),
+ )
+
+ with patch("skyvern.forge.agent.app") as mock_app:
+ mock_app.WORKFLOW_CONTEXT_MANAGER = context_manager
+ mock_app.BROWSER_MANAGER.cleanup_for_task = AsyncMock(return_value=browser_state)
+ mock_app.BROWSER_MANAGER.get_video_artifacts = AsyncMock(return_value=[])
+ mock_app.BROWSER_MANAGER.get_har_data = AsyncMock(return_value=har_data)
+ mock_app.BROWSER_MANAGER.get_browser_console_log = AsyncMock(return_value=console_log)
+ mock_app.ARTIFACT_MANAGER.create_task_archive = AsyncMock()
+
+ await ForgeAgent().cleanup_browser_and_create_artifacts(
+ close_browser_on_completion=True,
+ last_step=_make_step(),
+ task=task,
+ )
+
+ entries = mock_app.ARTIFACT_MANAGER.create_task_archive.await_args.kwargs["entries"]
+ assert b"424242" not in entries["har.har"][1]
+ assert b"424242" not in entries["browser_console.log"][1]
diff --git a/tests/unit/test_code_block_lint_mcp_tool.py b/tests/unit/test_code_block_lint_mcp_tool.py
index d74705310..5297a3515 100644
--- a/tests/unit/test_code_block_lint_mcp_tool.py
+++ b/tests/unit/test_code_block_lint_mcp_tool.py
@@ -97,3 +97,15 @@ async def test_syntax_error_is_caught_by_preflight() -> None:
assert result["ok"] is False
assert result["data"]["lint_ok"] is False
assert _has_diagnostic(result, section="preflight_diagnostics", code="SYNTAX_ERROR")
+
+
+async def test_body_readiness_advisory_warns_without_failing_the_lint_gate() -> None:
+ code = 'body = page.locator("body")\nawait body.wait_for(state="visible", timeout=30000)\nreturn {"ok": True}'
+
+ result = await skyvern_code_block_lint(code=code)
+
+ assert result["ok"] is True
+ assert result["data"]["lint_ok"] is True
+ assert result["data"]["preflight_diagnostics"] == []
+ assert _has_diagnostic(result, section="author_time_diagnostics", code="ROOT_CONTAINER_READINESS_WAIT")
diff --git a/tests/unit/test_code_block_sandbox.py b/tests/unit/test_code_block_sandbox.py
index 51e511ee9..ba23e648f 100644
--- a/tests/unit/test_code_block_sandbox.py
+++ b/tests/unit/test_code_block_sandbox.py
@@ -10,8 +10,11 @@ import asyncio
import json
from datetime import datetime, timezone
from types import SimpleNamespace
+from unittest.mock import MagicMock
import pytest
+from playwright.async_api import Page
+from playwright.async_api import TimeoutError as PlaywrightTimeoutError
from skyvern.config import settings
from skyvern.forge.sdk.workflow.code_block_safety import is_safe_script_code
@@ -1775,6 +1778,72 @@ class TestCodeBlockOtpNoLeak:
# Masking the secret must not cost the run the cause of its own failure (SKY-14294).
assert result.failure_reason == "Failed to execute code block. Reason: Exception: *****"
+ @pytest.mark.asyncio
+ async def test_otp_not_leaked_in_assembled_repair_payload(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ from unittest.mock import AsyncMock, MagicMock
+
+ import pyotp
+
+ from skyvern.forge.sdk.copilot.output_utils import build_run_blocks_response, sanitize_tool_result_for_llm
+ from skyvern.forge.sdk.copilot.tools import _attach_action_traces
+ from skyvern.forge.sdk.copilot.tools import run_execution as run_execution_module
+ from skyvern.forge.sdk.copilot.tools.run_execution import _summarize_action_trace
+ from skyvern.forge.sdk.workflow.models.code_block_recording import CodeBlockActionRecording
+ from skyvern.webeye.actions.actions import Action
+
+ wrc = _build_wrc_with_totp_seed()
+ expected_code = pyotp.TOTP(_RFC_TOTP_SEED).now()
+ recorded_actions: list[Action] = []
+
+ async def capture_actions(self: CodeBlockActionRecording, actions: list[Action]) -> None:
+ del self
+ recorded_actions.extend(actions)
+
+ monkeypatch.setattr(CodeBlockActionRecording, "persist", capture_actions)
+ result, _ = await _run_credential_code_block(
+ monkeypatch,
+ wrc,
+ code=f"code = await {_CREDENTIAL_KEY}.otp()\nraise Exception(code)",
+ label="otp_raise_payload",
+ )
+
+ for action in recorded_actions:
+ action.task_id = "task-otp"
+ mock_db = MagicMock()
+ mock_db.tasks = MagicMock()
+ mock_db.tasks.get_recent_actions_for_tasks = AsyncMock(return_value=recorded_actions)
+
+ class _AppStub:
+ DATABASE = mock_db
+
+ monkeypatch.setattr(run_execution_module, "app", _AppStub())
+ block = MagicMock(task_id="task-otp")
+ block_result = {
+ "label": "otp_raise_payload",
+ "block_type": "code",
+ "status": "failed",
+ "failure_reason": result.failure_reason,
+ }
+ await _attach_action_traces([block], [block_result], _ORG_ID)
+ action_trace_summary = _summarize_action_trace(block_result["action_trace"])
+ del block_result["action_trace"]
+ payload = build_run_blocks_response(
+ False,
+ {
+ "workflow_run_id": _WORKFLOW_RUN_ID,
+ "overall_status": "failed",
+ "failure_reason": result.failure_reason,
+ "blocks": [block_result],
+ "action_trace_summary": action_trace_summary,
+ },
+ )
+ sanitized = sanitize_tool_result_for_llm("run_blocks_and_collect_debug", payload)
+ serialized = json.dumps(sanitized)
+
+ assert expected_code not in serialized
+ assert _RFC_TOTP_SEED not in serialized
+ assert "code_line" in serialized
+
@pytest.mark.asyncio
async def test_legacy_totp_not_leaked_in_failure_reason(self, monkeypatch: pytest.MonkeyPatch) -> None:
import pyotp
@@ -2284,3 +2353,80 @@ class TestCodeBlockTemplateSecretScoping:
assert "ph_p2" not in template_data
assert not any(key.endswith("_real_password") for key in template_data)
assert template_data[self.UNDECLARED_KEY]["password"] == "ph_p2"
+
+
+class TestFailedReadinessWaitPropagates:
+ @staticmethod
+ def _page_whose_readiness_wait_times_out() -> object:
+ class TimingOutLocator:
+ async def wait_for(self, **kwargs: object) -> None:
+ raise PlaywrightTimeoutError(
+ 'Locator.wait_for: Timeout 30000ms exceeded.\nwaiting for locator("body") to be visible'
+ )
+
+ page = MagicMock(spec=Page)
+ page.locator = lambda _selector: TimingOutLocator()
+ return page
+
+ async def _execute(self, monkeypatch: pytest.MonkeyPatch, code: str) -> tuple[object, list[object]]:
+ page = self._page_whose_readiness_wait_times_out()
+
+ class ReadyBrowserState:
+ def __init__(self) -> None:
+ self.browser_artifacts = BrowserArtifacts()
+
+ async def get_working_page(self) -> object:
+ return page
+
+ persisted: list[object] = []
+
+ async def validate_code_block(*args: object, **kwargs: object) -> None:
+ return None
+
+ async def get_browser_state(*args: object, **kwargs: object) -> ReadyBrowserState:
+ return ReadyBrowserState()
+
+ async def record_output(self: object, ctx: object, run_id: object, value: object) -> None:
+ persisted.append(value)
+
+ monkeypatch.setattr(
+ "skyvern.forge.sdk.workflow.models.block.app.AGENT_FUNCTION.validate_code_block",
+ validate_code_block,
+ )
+ monkeypatch.setattr(CodeBlock, "get_or_create_browser_state", get_browser_state)
+ monkeypatch.setattr(
+ CodeBlock, "get_workflow_run_context", lambda self, run_id: FakeWorkflowRunContext(values={})
+ )
+ monkeypatch.setattr(CodeBlock, "record_output_parameter_value", record_output)
+
+ now = datetime.now(timezone.utc)
+ block = CodeBlock(
+ label="read_summary",
+ code=code,
+ output_parameter=OutputParameter(
+ parameter_type=ParameterType.OUTPUT,
+ key="read_summary_output",
+ description="test output",
+ output_parameter_id="op_read_summary",
+ workflow_id="w_test",
+ created_at=now,
+ modified_at=now,
+ ),
+ )
+ result = await block.execute(workflow_run_id="wrid_test", workflow_run_block_id="")
+ return result, persisted
+
+ @pytest.mark.asyncio
+ async def test_failed_readiness_wait_fails_the_run_without_a_derived_answer(
+ self, monkeypatch: pytest.MonkeyPatch
+ ) -> None:
+ result, persisted = await self._execute(
+ monkeypatch,
+ 'await page.locator("body").wait_for(state="visible", timeout=30000)\n'
+ 'return {"summary": "24 results found"}\n',
+ )
+
+ assert result.success is False
+ assert result.status == BlockStatus.failed
+ assert "24 results found" not in json.dumps(persisted)
+ assert all(value in (None, {}) for value in persisted)
diff --git a/tests/unit/test_copilot_code_block_persist_seam.py b/tests/unit/test_copilot_code_block_persist_seam.py
index 8b4cc2e52..1f936c82a 100644
--- a/tests/unit/test_copilot_code_block_persist_seam.py
+++ b/tests/unit/test_copilot_code_block_persist_seam.py
@@ -22,7 +22,14 @@ from skyvern.forge.sdk.copilot.request_policy import (
)
from skyvern.forge.sdk.copilot.secret_scrub import REDACTED_SECRET_PLACEHOLDER, register_secret_scrub_value
from skyvern.forge.sdk.copilot.tools import workflow_update as workflow_update_module
-from skyvern.forge.sdk.copilot.tools.workflow_update import CodeArtifactCompletionCriterion, _update_workflow
+from skyvern.forge.sdk.copilot.tools.workflow_update import (
+ CodeArtifactCompletionCriterion,
+ _accepted_code_delta,
+ _advisory_labels_by_message,
+ _author_time_findings,
+ _changed_code_blocks,
+ _update_workflow,
+)
from skyvern.forge.sdk.copilot.workflow_credential_utils import parse_workflow_yaml, workflow_blocks
from skyvern.forge.sdk.copilot.workflow_yaml import delete_block_from_workflow
@@ -102,6 +109,7 @@ async def test_accept_path_persists_model_yaml_and_code_exactly(monkeypatch: pyt
ctx = _ctx()
submitted = _code_yaml(
"""
+ await page.locator("body").wait_for(state="visible", timeout=45000)
await page.get_by_role("button", name="Search", exact=True).click()
result = (await page.get_by_role("status").inner_text()).strip()
return {"output": {"result": result}}
@@ -118,6 +126,9 @@ async def test_accept_path_persists_model_yaml_and_code_exactly(monkeypatch: pyt
assert persisted == [submitted]
assert ctx.workflow_yaml == submitted
assert _single_code(ctx.workflow_yaml) == _single_code(submitted)
+ assert result["data"]["stored_code"]["submit_search"] == _single_code(submitted)
+ assert 'page.locator("body").wait_for(state="visible", timeout=45000)' in _single_code(ctx.workflow_yaml)
+ assert [finding["reason_code"] for finding in result["data"]["findings"]] == ["code_block_readiness_wait_advisory"]
assert "imposed_substitutions" not in result["data"]
@@ -591,3 +602,34 @@ def test_no_output_contract_actuation_meta_plane_exports_remain() -> None:
assert "consume_output_contract_advisory_grant_for_run" not in names
assert "consume_output_contract_advisory_grant_for_run_result" not in names
assert "record_output_contract_run_output_evidence" not in names
+
+
+class TestBodyReadinessAdvisoryDelivery:
+ _BODY_WAIT = 'body = page.locator("body")\nawait body.wait_for(state="visible", timeout=30000)\n'
+
+ def _oversized_block(self) -> str:
+ padding = "\n".join(f'value_{index} = "{index}"' for index in range(6000))
+ return f'{self._BODY_WAIT}{padding}\nreturn {{"ok": True}}\n'
+
+ def _findings(self, prior: str | None, accepted: str) -> list[dict[str, object]]:
+ return _author_time_findings(
+ schema_incompatibility=None,
+ metadata_violations=[],
+ code_block_diagnostics=_advisory_labels_by_message(_changed_code_blocks(prior, accepted, accepted)),
+ )
+
+ def test_budget_withheld_block_still_carries_the_advisory(self) -> None:
+ accepted = _code_yaml(self._oversized_block(), label="read_summary")
+
+ stored_code, withheld = _accepted_code_delta(_changed_code_blocks(None, accepted, accepted))
+ findings = self._findings(None, accepted)
+
+ assert stored_code == {}
+ assert withheld
+ assert [finding["reason_code"] for finding in findings] == ["code_block_readiness_wait_advisory"]
+ assert "`read_summary`" in str(findings[0]["summary"])
+
+ def test_unchanged_block_carries_no_advisory(self) -> None:
+ prior = _code_yaml(self._BODY_WAIT, label="read_summary")
+
+ assert self._findings(prior, prior) == []
diff --git a/tests/unit/test_copilot_code_block_synthesis.py b/tests/unit/test_copilot_code_block_synthesis.py
index ad4d41172..8b8afc326 100644
--- a/tests/unit/test_copilot_code_block_synthesis.py
+++ b/tests/unit/test_copilot_code_block_synthesis.py
@@ -27,7 +27,11 @@ from skyvern.forge.sdk.copilot.authoring_parameter_binding import (
build_authoring_parameter_binding_directive,
build_authoring_parameter_binding_snapshot,
)
-from skyvern.forge.sdk.copilot.code_block_preflight import preflight_code_block
+from skyvern.forge.sdk.copilot.code_block_preflight import (
+ advisory_code_block_diagnostics,
+ author_time_code_block_diagnostics,
+ preflight_code_block,
+)
from skyvern.forge.sdk.copilot.code_block_security import author_time_code_security_errors
from skyvern.forge.sdk.copilot.code_block_synthesis import (
_DOWNLOAD_VAR_BASE,
@@ -42,6 +46,7 @@ from skyvern.forge.sdk.copilot.code_block_synthesis import (
INPUT_TEMPLATED_PROVENANCE_SOURCE,
LOCATOR_WITNESS_PARAM_SOURCE,
SynthesisDiagnostics,
+ SynthesizedCodeBlock,
_get_by_role_expr_strict,
_is_submit_interaction,
_strict_period_date_pattern,
@@ -90,6 +95,10 @@ def _interaction(tool_name: str, **fields: Any) -> dict[str, Any]:
return {"tool_name": tool_name, **fields}
+def _dropped_root_targets(result: SynthesizedCodeBlock) -> list[dict[str, Any]]:
+ return [d for d in result.diagnostics.dropped_interactions if d.get("reason_code") == "root_locator_target"]
+
+
def test_authoring_parameter_snapshot_rebinds_captured_fill_without_duplicate() -> None:
trajectory = [
_interaction("type_text", selector="#location", source_url="https://example.com/form", trajectory_index=7),
@@ -732,11 +741,11 @@ class TestLocatorSynthesis:
assert result.code.count('await page.locator("button").first.click()') == 2
ast.parse("async def _block(page):\n" + result.code)
- def test_universal_selector_offered_with_first(self) -> None:
+ def test_universal_selector_dropped_as_a_root_container(self) -> None:
result = synthesize_code_block([_interaction("click", selector="*", source_url="https://example.com/p")])
assert result is not None
- assert 'await page.locator("*").first.click()' in result.code
- assert 'await page.locator("*").click()' not in result.code
+ assert 'page.locator("*")' not in result.code
+ assert [d["selector"] for d in _dropped_root_targets(result)] == ["*"]
def test_strict_imposed_refuses_universal_selector(self) -> None:
trajectory = [
@@ -746,7 +755,7 @@ class TestLocatorSynthesis:
result = synthesize_code_block(trajectory, strict_selectors=True)
assert result is not None
assert 'page.locator("*")' not in result.code
- assert [d for d in result.diagnostics.dropped_interactions if d.get("reason_code") == "ambiguous_bare_selector"]
+ assert [d["selector"] for d in _dropped_root_targets(result)] == ["*"]
def test_attribute_qualified_universal_selector_not_disambiguated(self) -> None:
result = synthesize_code_block(
@@ -832,6 +841,87 @@ class TestLocatorSynthesis:
assert "\n" not in emitted
assert f"await {emitted}.click()" in result.code
+ def test_observed_readiness_wait_never_targets_the_document_body(self) -> None:
+ trajectory = [
+ _interaction("click", selector="#open", source_url="https://example.com/home"),
+ _interaction(
+ "click",
+ selector="body",
+ source_url="https://example.com/report",
+ observed_hidden=True,
+ ),
+ ]
+ result = synthesize_code_block(trajectory)
+ assert result is not None
+ assert 'page.locator("body").first.wait_for(state="visible"' not in result.code
+ assert 'page.locator("body")' not in result.code
+ assert [d["selector"] for d in _dropped_root_targets(result)] == ["body"]
+
+ def test_root_container_interaction_dropped_while_anchored_sibling_survives(self) -> None:
+ trajectory = [
+ _interaction("click", selector="#open", source_url="https://example.com/home"),
+ _interaction(
+ "click",
+ selector=":root",
+ source_url="https://example.com/report",
+ observed_hidden=True,
+ ),
+ _interaction(
+ "click",
+ selector="body",
+ source_url="https://example.com/report",
+ observed_hidden=True,
+ role="button",
+ accessible_name="Run query",
+ ),
+ ]
+ result = synthesize_code_block(trajectory)
+ assert result is not None
+ for root_selector in (":root", "body", "html"):
+ assert f'page.locator("{root_selector}")' not in result.code
+ assert 'await page.get_by_role("button", name="Run query").wait_for(state="visible"' in result.code
+ assert [d["selector"] for d in _dropped_root_targets(result)] == [":root"]
+
+ def test_dropped_leading_root_interaction_never_forgives_a_read_out_of_the_block(self) -> None:
+ trajectory = [
+ _interaction("click", selector="body", source_url="https://example.com/report", trajectory_index=0),
+ _interaction(
+ "read_value",
+ read_expression="document.querySelector('#count').textContent",
+ read_output_path="output.error_count",
+ trajectory_index=1,
+ ),
+ _interaction("type_text", selector="#query", value="errors", trajectory_index=2),
+ ]
+ result = synthesize_code_block(trajectory)
+ assert result is not None
+ assert not any(f.get("tool_name") == "read_value" for f in result.diagnostics.forgiven_interactions)
+ assert "_read_value_0 = await page.evaluate(" in result.code
+ assert '"error_count"' in result.code
+ assert [d["selector"] for d in _dropped_root_targets(result)] == ["body"]
+
+ def test_strict_dynamic_row_gate_outranks_the_root_container_role_retarget(self) -> None:
+ interaction = _interaction(
+ "click",
+ selector="body",
+ source_url="https://example.com/statements",
+ role="button",
+ accessible_name="Run query",
+ dynamic_row_evidence={"row_selector": "div.statement-row", "evidence_fingerprint": "tampered"},
+ )
+ result = synthesize_code_block(
+ [_interaction("click", selector="#open", source_url="https://example.com/home"), interaction],
+ strict_selectors=True,
+ )
+ assert result is not None
+ assert 'get_by_role("button", name="Run query")' not in result.code
+ assert _dropped_root_targets(result) == []
+ assert [
+ d["selector"]
+ for d in result.diagnostics.dropped_interactions
+ if d.get("reason_code") == "invalid_dynamic_row_evidence"
+ ] == ["body"]
+
class TestActionSynthesis:
def test_type_text_becomes_param_slot_fill(self) -> None:
@@ -2550,6 +2640,39 @@ class TestDownloadRungSynthesis:
# A download does not navigate, so no trailing load-wait inside the appended step.
assert 'wait_for_load_state("load")' not in download_step
+ def test_root_container_download_target_drop_is_named_in_the_returned_notes(self) -> None:
+ result = synthesize_code_block([_nav_click()], reached_download_target=_download_target(selector="body"))
+ assert result is not None
+ assert any("root container" in note and "download" in note for note in result.notes)
+
+ def test_root_container_download_target_compiles_no_entry_readiness_wait(self) -> None:
+ result = synthesize_code_block([_nav_click()], reached_download_target=_download_target(selector="body"))
+ assert result is not None
+ for root_selector in ("body", "html", ":root"):
+ assert f'page.locator("{root_selector}")' not in result.code
+ assert '_scout_entry_target = page.locator("div.stmt-row")' in result.code
+ assert "click_and_claim_download" not in result.code
+ assert 'await page.goto("https://example.com/bills", wait_until="domcontentloaded")' in result.code
+ assert [d["trajectory_index"] for d in _dropped_root_targets(result)] == [-1]
+ ast.parse("async def _block(page):\n" + result.code)
+
+ @pytest.mark.parametrize(
+ "overrides",
+ [
+ {"already_registered": True},
+ {"download_kind": "observed_render"},
+ ],
+ )
+ def test_root_container_download_target_already_disqualified_records_no_root_drop(
+ self, overrides: dict[str, Any]
+ ) -> None:
+ result = synthesize_code_block(
+ [_nav_click()], reached_download_target=_download_target(selector="body", **overrides)
+ )
+ assert result is not None
+ assert 'page.locator("body")' not in result.code
+ assert _dropped_root_targets(result) == []
+
def test_already_registered_emits_no_download_step(self, monkeypatch: pytest.MonkeyPatch) -> None:
result = synthesize_code_block(
[_nav_click()], reached_download_target=_download_target(already_registered=True, selector="")
@@ -4051,3 +4174,83 @@ def test_entry_anchors_on_what_the_flow_fills_not_the_link_it_clicks_away_from()
# The click is still demonstrated, it just no longer decides where the flow starts.
assert 'a[href=\\"/account/forgot_password\\"]").click()' in block.code
assert [step["action_type"] for step in block.steps][:4] == ["goto_url", "click", "input_text", "input_text"]
+
+
+class TestBodyReadinessWaitAdvisory:
+ _CUSTODY_BLOCK = (
+ 'body = page.locator("body")\n'
+ 'await body.wait_for(state="visible", timeout=30000)\n'
+ "await page.wait_for_timeout(3000)\n"
+ "page_text = await body.inner_text()\n"
+ "summary = next(\n"
+ ' (line.strip() for line in page_text.splitlines() if line.strip().lower().endswith("results found")),\n'
+ " None,\n"
+ ")\n"
+ "if not summary:\n"
+ ' raise RuntimeError("Could not find the results summary.")\n'
+ 'return {"summary": summary}\n'
+ )
+
+ @pytest.mark.parametrize(
+ "code",
+ [
+ _CUSTODY_BLOCK,
+ 'await page.locator("body").wait_for(state="visible", timeout=30000)\n',
+ 'body = page.locator("body")\nawait body.wait_for(timeout=15000)\n',
+ 'body = page.locator("BODY")\nawait body.wait_for(state="attached")\n',
+ 'body = page.locator("body")\nif ready:\n await body.wait_for(state="visible")\n',
+ 'await page.locator("html").wait_for(state="visible")\n',
+ 'await page.locator(":root").wait_for(state="visible")\n',
+ 'await page.locator("*").wait_for(state="visible")\n',
+ 'await page.wait_for_selector("body", state="visible", timeout=30000)\n',
+ 'await page.wait_for_selector("html")\n',
+ 'await expect(page.locator("body")).to_be_visible()\n',
+ 'await expect(page.locator(":root")).to_be_attached()\n',
+ 'await page.locator("body").first.wait_for(state="visible")\n',
+ 'await page.locator("body").nth(0).wait_for(state="visible")\n',
+ 'body = page.locator("body").nth(0)\nawait body.wait_for(state="visible")\n',
+ ],
+ )
+ def test_contentless_body_readiness_wait_surfaces_advisory(self, code: str) -> None:
+ diagnostics = advisory_code_block_diagnostics(code)
+
+ assert sum(1 for d in diagnostics if d.code == "ROOT_CONTAINER_READINESS_WAIT") == 1
+
+ def test_advisory_names_the_principle_without_authoring_a_replacement_selector(self) -> None:
+ diagnostics = advisory_code_block_diagnostics(self._CUSTODY_BLOCK)
+
+ assert {d.code for d in diagnostics} == {"ROOT_CONTAINER_READINESS_WAIT", "ROOT_CONTAINER_TEXT_READ"}
+ assert all("results found" not in d.message for d in diagnostics)
+
+ @pytest.mark.parametrize(
+ "code",
+ [
+ 'body = page.locator("body")\ntext = await body.inner_text()\n',
+ 'body = page.locator("body")\nawait body.wait_for(state="hidden", timeout=30000)\n',
+ 'await page.locator("body").wait_for(state="detached")\n',
+ 'summary = page.locator("body").locator(".summary")\nawait summary.wait_for(state="visible")\n',
+ 'summary = page.locator("body").get_by_text("results found")\nawait summary.wait_for(state="visible")\n',
+ 'body = page.locator("body")\nbody = page.locator("#results")\nawait body.wait_for(state="visible")\n',
+ 'await page.wait_for_selector("body", state="detached")\n',
+ 'await page.wait_for_selector("#results", state="visible")\n',
+ 'await expect(page.locator("body").get_by_text("results found")).to_be_visible()\n',
+ 'await expect(page.locator("#results")).to_be_visible()\n',
+ ],
+ )
+ def test_narrowed_disappearance_and_read_only_body_use_stays_silent(self, code: str) -> None:
+ assert not any(d.code == "ROOT_CONTAINER_READINESS_WAIT" for d in advisory_code_block_diagnostics(code))
+
+ def test_advisory_reaches_author_time_diagnostics_but_not_the_preflight_gate(self) -> None:
+ assert any(
+ d.code == "ROOT_CONTAINER_READINESS_WAIT" for d in author_time_code_block_diagnostics(self._CUSTODY_BLOCK)
+ )
+ assert preflight_code_block(self._CUSTODY_BLOCK, parameter_keys=()) == []
+
+ def test_whole_page_read_is_named_alongside_the_wait_it_drives(self) -> None:
+ codes = {d.code for d in author_time_code_block_diagnostics(self._CUSTODY_BLOCK)}
+ assert "ROOT_CONTAINER_TEXT_READ" in codes
+ assert preflight_code_block(self._CUSTODY_BLOCK, parameter_keys=()) == []
+
+ def test_a_read_targeting_the_value_is_not_flagged(self) -> None:
+ targeted = 'v = await page.get_by_text("logs found").inner_text()'
+ assert author_time_code_block_diagnostics(targeted) == []
diff --git a/tests/unit/test_copilot_output_utils.py b/tests/unit/test_copilot_output_utils.py
index a758f3f76..5b288b062 100644
--- a/tests/unit/test_copilot_output_utils.py
+++ b/tests/unit/test_copilot_output_utils.py
@@ -273,7 +273,7 @@ class TestSanitization:
"frontier_start_label": "b",
"current_url": "https://example.test",
"page_title": "Example",
- "action_trace_summary": ["click #submit failed"],
+ "action_trace_summary": ["click #submit failed description=code error at line 18 code_line=18"],
"blocks": [{"label": "b", "block_type": "EXTRACTION", "status": "failed"}],
},
}
@@ -283,7 +283,7 @@ class TestSanitization:
assert data["requested_block_labels"] == ["a", "b"]
assert data["executed_block_labels"] == ["b"]
assert data["frontier_start_label"] == "b"
- assert data["action_trace_summary"] == ["click #submit failed"]
+ assert data["action_trace_summary"] == ["click #submit failed description=code error at line 18 code_line=18"]
assert data["current_url"] == "https://example.test"
diff --git a/tests/unit/test_copilot_runtime.py b/tests/unit/test_copilot_runtime.py
index 7f09894e0..0a8c874c1 100644
--- a/tests/unit/test_copilot_runtime.py
+++ b/tests/unit/test_copilot_runtime.py
@@ -277,10 +277,7 @@ async def test_ensure_browser_session_times_out_and_cleans_up(monkeypatch: pytes
result = await ensure_browser_session(ctx)
assert result == {"ok": False, "error": "Failed to create browser session"}
assert ctx.browser_session_id is None
- mock_manager.close_session.assert_awaited_once_with(
- organization_id="org_1",
- browser_session_id="bs_2",
- )
+ mock_manager.close_session.assert_awaited_once_with("org_1", "bs_2")
@pytest.mark.asyncio
diff --git a/tests/unit/test_copilot_screenshot_handling.py b/tests/unit/test_copilot_screenshot_handling.py
index 92e736312..d8f9920cc 100644
--- a/tests/unit/test_copilot_screenshot_handling.py
+++ b/tests/unit/test_copilot_screenshot_handling.py
@@ -199,7 +199,14 @@ class TestAttachActionTraces:
@staticmethod
def _make_action(
- task_id: str, action_type: str, status: str, reasoning: str | None, element_id: str | None
+ task_id: str,
+ action_type: str,
+ status: str,
+ reasoning: str | None,
+ element_id: str | None,
+ *,
+ description: str | None = None,
+ output: dict[str, Any] | list | str | None = None,
) -> MagicMock:
action = MagicMock()
action.task_id = task_id
@@ -207,6 +214,8 @@ class TestAttachActionTraces:
action.status = status
action.reasoning = reasoning
action.element_id = element_id
+ action.description = description
+ action.output = output
return action
@pytest.mark.asyncio
@@ -239,6 +248,90 @@ class TestAttachActionTraces:
assert trace[0]["element"] == "elem-42"
assert trace[1]["reasoning"] == "typed email"
+ @pytest.mark.asyncio
+ async def test_attach_action_traces_projects_only_valid_code_failure_fields(
+ self, monkeypatch: pytest.MonkeyPatch
+ ) -> None:
+ from skyvern.forge.sdk.copilot.tools import _attach_action_traces
+
+ block = self._make_block("task-1", "failed")
+ result: dict[str, Any] = {"label": "step1", "status": "failed"}
+ actions = [
+ self._make_action(
+ "task-1",
+ "null_action",
+ "failed",
+ None,
+ None,
+ description="code error at line 18",
+ output={"code_line": 18, "arbitrary": "must-not-survive"},
+ ),
+ self._make_action(
+ "task-1",
+ "click",
+ "failed",
+ None,
+ "button-1",
+ description="ordinary action description must not survive",
+ output={"code_line": 17},
+ ),
+ self._make_action(
+ "task-1",
+ "click",
+ "failed",
+ None,
+ "button-2",
+ description="bool is not an integer line",
+ output={"code_line": True},
+ ),
+ self._make_action(
+ "task-1",
+ "input_text",
+ "failed",
+ None,
+ "input-1",
+ description="string is not an integer line",
+ output={"code_line": "7"},
+ ),
+ self._make_action(
+ "task-1",
+ "input_text",
+ "failed",
+ None,
+ "input-2",
+ description="non-dict output",
+ output=[{"code_line": 7}],
+ ),
+ ]
+
+ mock_db = MagicMock()
+ mock_db.tasks = MagicMock()
+ mock_db.tasks.get_recent_actions_for_tasks = AsyncMock(return_value=actions)
+ _install_mock_database(monkeypatch, mock_db)
+
+ await _attach_action_traces([block], [result], "org-1")
+
+ trace = result["action_trace"]
+ assert [entry["action"] for entry in trace] == [
+ "null_action",
+ "click",
+ "click",
+ "input_text",
+ "input_text",
+ ]
+ assert trace[0]["description"] == "code error at line 18"
+ assert trace[0]["code_line"] == 18
+ assert "output" not in trace[0]
+ assert "arbitrary" not in trace[0]
+ assert "description" not in trace[1]
+ assert "code_line" not in trace[1]
+ assert "description" not in trace[2]
+ assert "code_line" not in trace[2]
+ assert "description" not in trace[3]
+ assert "code_line" not in trace[3]
+ assert "description" not in trace[4]
+ assert "code_line" not in trace[4]
+
@pytest.mark.asyncio
async def test_attach_action_traces_skips_success(self, monkeypatch: pytest.MonkeyPatch) -> None:
from skyvern.forge.sdk.copilot.tools import _attach_action_traces
@@ -296,6 +389,43 @@ class TestAttachActionTraces:
assert "action_trace" in r, f"Missing action_trace for status={r['status']}"
+class TestSummarizeActionTrace:
+ def test_selects_six_newest_entries_then_renders_them_chronologically(self) -> None:
+ from skyvern.forge.sdk.copilot.tools.run_execution import _summarize_action_trace
+
+ newest_first = [
+ {"action": "click", "status": "completed", "element": f"newest-{index}"} for index in range(8, 0, -1)
+ ]
+
+ summary = _summarize_action_trace(newest_first)
+
+ assert summary == [
+ "click newest-3 completed",
+ "click newest-4 completed",
+ "click newest-5 completed",
+ "click newest-6 completed",
+ "click newest-7 completed",
+ "click newest-8 completed",
+ ]
+
+ def test_retains_projected_failure_description_and_code_line(self) -> None:
+ from skyvern.forge.sdk.copilot.tools.run_execution import _summarize_action_trace
+
+ summary = _summarize_action_trace(
+ [
+ {
+ "action": "goto_url",
+ "status": "failed",
+ "element": None,
+ "description": "code error at line 9",
+ "code_line": 9,
+ }
+ ]
+ )
+
+ assert summary == ["goto_url failed description=code error at line 9 code_line=9"]
+
+
class TestSyntheticScreenshotPlaceholders:
def test_placeholder_counts_as_synthetic_user_message(self) -> None:
from skyvern.forge.sdk.copilot.enforcement import SCREENSHOT_PLACEHOLDER, is_synthetic_user_message
diff --git a/tests/unit/test_fail_task_error_detection.py b/tests/unit/test_fail_task_error_detection.py
index 90da0c03a..98a9633af 100644
--- a/tests/unit/test_fail_task_error_detection.py
+++ b/tests/unit/test_fail_task_error_detection.py
@@ -370,3 +370,27 @@ async def test_fail_task_with_task_already_canceled(agent, mock_browser_state):
# Error detection should not be called
mock_detect.assert_not_called()
+
+
+async def test_fail_task_with_task_already_timed_out(agent, mock_browser_state):
+ """A reaper-timed-out task cannot be failed: return False, same as already-canceled."""
+ now = datetime.now()
+ organization = make_organization(now)
+ task = make_task(
+ now,
+ organization,
+ status=TaskStatus.timed_out,
+ error_code_mapping=None,
+ )
+ step = make_step(now, task, step_id="step-1", status=StepStatus.running, order=1, output=None)
+
+ with patch.object(agent, "update_step", new_callable=AsyncMock):
+ with patch.object(agent, "update_task", new_callable=AsyncMock) as mock_update_task:
+ from skyvern.exceptions import TaskAlreadyTimeout
+
+ mock_update_task.side_effect = TaskAlreadyTimeout(task.task_id)
+
+ result = await agent.fail_task(task, step, "Task failed", mock_browser_state)
+
+ assert result is False
diff --git a/tests/unit/test_mcp_legacy_manifest.py b/tests/unit/test_mcp_legacy_manifest.py
index 584d5f9a3..6b51c91d0 100644
--- a/tests/unit/test_mcp_legacy_manifest.py
+++ b/tests/unit/test_mcp_legacy_manifest.py
@@ -32,7 +32,9 @@ LEGACY_TOOL_MANIFEST_DIGESTS = {
"skyvern_browser_profile_update": "e83c3227ef13e827bd0c7d6e23bb0e03fefe2fe83e73bfa4b3ca696d151b2b61",
"skyvern_browser_session_close": "d0923948805b1bbccd7803df1a3748426263a8bf630cf9fcbee5a21f2f463825",
"skyvern_browser_session_connect": "7c21d99fbb35dc0199e59367373387dca0e8f8d9dd4615303a3f09f579db2d06",
- "skyvern_browser_session_create": "25665a100837ea7336ffc0a328136906a932d24360d58bb2094e62064d20af09",
+ # Re-frozen for SKY-13272: `timeout` is now rejected above MAX_TIMEOUT instead of clamped, so the param
+ # description says "max 240" rather than "capped at 240". Description text only; the schema is unchanged.
+ "skyvern_browser_session_create": "6244d9614c04f403ee9db0c6b0cdee10f5be121cf85979b069a106044b08b161",
"skyvern_browser_session_get": "fdf579ac23ce28eea5e243a407a8f810fdcca6ed491c2da7fbe56836b1474109",
"skyvern_browser_session_list": "dac429184440a1f76d2a787fb81793e37220408d749f0d3cacfbd29222e55f19",
"skyvern_clear_local_storage": "8a6b80bfdbe3b1e2e36f7f485cb5bb7ff527594e37536816c2f6b614852078f5",
diff --git a/tests/unit/test_parallel_verification.py b/tests/unit/test_parallel_verification.py
index 9bc817e8f..df11dafd0 100644
--- a/tests/unit/test_parallel_verification.py
+++ b/tests/unit/test_parallel_verification.py
@@ -1,5 +1,7 @@
+import asyncio
from datetime import UTC, datetime
-from unittest.mock import AsyncMock, MagicMock
+from typing import Any
+from unittest.mock import AsyncMock, MagicMock, patch
from zoneinfo import ZoneInfo
import pytest
@@ -882,3 +884,90 @@ async def test_speculative_plan_null_response_does_not_unbind_without_page_infor
# is that agent_step completes (pass or fail) without raising
# UnboundLocalError for without_page_information.
assert step.status in (StepStatus.completed, StepStatus.failed)
+
+
+async def test_discarded_speculative_plan_cost_write_survives_task_cleanup(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ """The speculative extract-actions call is billed even when its plan is thrown away, so
+ the write that attributes its cost has to reach the DB. It is started in the background
+ (the completion path must not wait on an LLM call it no longer needs) and drained in
+ clean_up_task, which is the choke point every terminal path funnels through. Before the
+ drain existed the task was orphaned: nothing held a reference and nothing awaited it, so
+ the write was dropped at teardown.
+ """
+ agent = ForgeAgent()
+ now = datetime.now(UTC)
+ organization = make_organization(now)
+ task = make_task(now, organization, navigation_goal=None, workflow_run_id="wr-1")
+
+ step = make_step(
+ now,
+ task,
+ step_id="step-123",
+ status=StepStatus.completed,
+ order=0,
+ output=AgentStepOutput(action_results=[], actions_and_results=[]),
+ )
+ next_step = make_step(now, task, step_id="step-next", status=StepStatus.created, order=1, output=None)
+
+ setup_parallel_verification_mocks(
+ agent,
+ step=step,
+ task=task,
+ monkeypatch=monkeypatch,
+ next_step=next_step,
+ complete_action=CompleteAction(reasoning="done", verified=True),
+ handle_action_responses=[[ActionSuccess()]],
+ )
+
+ # Stands in for the speculative LLM call still being in flight when the completion path
+ # returns. call_later rather than sleep: the shared mocks replace asyncio.sleep.
+ speculative_call_finished = asyncio.Event()
+ asyncio.get_running_loop().call_later(0.2, speculative_call_finished.set)
+ persisted_steps: list[str] = []
+
+ async def slow_persist(discarded_step: Step, speculative_task: Any, *, cancel_step: bool = False) -> None:
+ await speculative_call_finished.wait()
+ persisted_steps.append(discarded_step.step_id)
+
+ monkeypatch.setattr(agent, "_persist_speculative_metadata_for_discarded_plan", slow_persist)
+
+ context = SkyvernContext(organization_id=organization.organization_id, task_id=task.task_id)
+ skyvern_context.set(context)
+ try:
+ browser_state, scraped_page, page = make_browser_state()
+ completed, _, _ = await agent._handle_completed_step_with_parallel_verification(
+ organization=organization,
+ task=task,
+ step=step,
+ page=page,
+ browser_state=browser_state,
+ scraped_page=scraped_page,
+ engine=RunEngine.skyvern_v1,
+ )
+
+ assert completed is True
+ # The completion path returned without waiting on the still-running speculative call.
+ assert persisted_steps == []
+
+ with (
+ patch("skyvern.forge.agent.analytics.capture"),
+ patch.object(agent, "_finalize_downloaded_files_for_task", AsyncMock(return_value=[])),
+ patch("skyvern.forge.agent.app") as mock_app,
+ ):
+ mock_app.DATABASE.tasks.get_task = AsyncMock(return_value=task)
+ mock_app.STORAGE.save_downloaded_files = AsyncMock()
+ await agent.clean_up_task(
+ task,
+ last_step=step,
+ need_final_screenshot=False,
+ need_call_webhook=False,
+ close_browser_on_completion=False,
+ )
+
+ assert persisted_steps == [next_step.step_id]
+ assert context.pending_speculative_persist_tasks == []
+ finally:
+ skyvern_context.reset()
diff --git a/tests/unit/test_pdf_fill_block.py b/tests/unit/test_pdf_fill_block.py
index af51ff270..6605601cc 100644
--- a/tests/unit/test_pdf_fill_block.py
+++ b/tests/unit/test_pdf_fill_block.py
@@ -5,8 +5,9 @@ import re
from datetime import UTC, datetime
from pathlib import Path
from typing import Any
-from unittest.mock import AsyncMock
+from unittest.mock import AsyncMock, MagicMock
+import pdfplumber
import pytest
from pypdf import PdfReader, PdfWriter
from pypdf.generic import (
@@ -28,8 +29,9 @@ from skyvern.forge.sdk.workflow.models import pdf_fill_block
from skyvern.forge.sdk.workflow.models.block import PdfFillBlock, extract_file_url_from_block_output
from skyvern.forge.sdk.workflow.models.parameter import OutputParameter
from skyvern.forge.sdk.workflow.models.pdf_fill_block import FlatPdfAnchor, FlatPlacement, PdfFieldInventory
-from skyvern.forge.sdk.workflow.workflow_definition_converter import block_yaml_to_block
-from skyvern.schemas.workflows import BlockStatus, BlockType, PdfFillBlockYAML
+from skyvern.forge.sdk.workflow.workflow_definition_converter import block_yaml_to_block, convert_workflow_definition
+from skyvern.schemas.workflows import BlockStatus, BlockType, PdfFillBlockYAML, WorkflowDefinitionYAML
+from tests.unit.fake_workflow_run_context import FakeWorkflowRunContext
def _make_output_parameter(label: str = "fill_pdf") -> OutputParameter:
@@ -1248,3 +1250,150 @@ def test_pdf_fill_yaml_rejects_raw_custom_llm_key() -> None:
assert yaml_block.llm_key is None
assert yaml_block.model is None
+
+
+class FakePdfFillContext(FakeWorkflowRunContext):
+ organization_id = None
+
+ def has_parameter(self, key: str) -> bool:
+ return key in self.values
+
+ def get_value(self, key: str) -> Any:
+ return self.values[key]
+
+ def resolve_effective_workflow_system_prompt(self, *_args: Any, **_kwargs: Any) -> None:
+ return None
+
+ def record_block_workflow_system_prompt(self, *_args: Any, **_kwargs: Any) -> None:
+ return None
+
+ async def register_output_parameter_value_post_execution(self, parameter: Any, value: Any) -> None:
+ self.set_value(parameter.key, value)
+
+
+def _build_pdf_fill_block(monkeypatch: pytest.MonkeyPatch, tmp_path: Path, **yaml_overrides: Any) -> PdfFillBlock:
+ yaml_kwargs: dict[str, Any] = {
+ "block_type": "pdf_fill",
+ "label": "fill_form",
+ "file_url": "{{ source_pdf }}",
+ "prompt": "Fill the form from the payload.",
+ "payload": {"name": "Jane A Doe"},
+ }
+ yaml_kwargs.update(yaml_overrides)
+ definition = convert_workflow_definition(
+ WorkflowDefinitionYAML(parameters=[], blocks=[PdfFillBlockYAML(**yaml_kwargs)]),
+ workflow_id="wf_pdf_fill_e2e",
+ )
+ block = definition.blocks[0]
+ assert isinstance(block, PdfFillBlock)
+ monkeypatch.setattr(
+ "skyvern.forge.sdk.workflow.models.pdf_fill_block.get_path_for_workflow_download_directory",
+ lambda workflow_run_id: tmp_path / "downloads" / workflow_run_id,
+ )
+ return block
+
+
+def _install_fake_context(monkeypatch: pytest.MonkeyPatch, values: dict[str, Any]) -> FakePdfFillContext:
+ context = FakePdfFillContext(values=values)
+ monkeypatch.setattr(PdfFillBlock, "get_workflow_run_context", staticmethod(lambda _wr_id: context))
+ mock_app = MagicMock()
+ mock_app.DATABASE.workflow_runs.create_or_update_workflow_run_output_parameter = AsyncMock()
+ mock_app.DATABASE.observer.update_workflow_run_block = AsyncMock()
+ monkeypatch.setattr("skyvern.forge.sdk.workflow.models.pdf_fill_block.app", mock_app)
+ monkeypatch.setattr("skyvern.forge.sdk.workflow.models.block.app", mock_app)
+ return context
+
+
+async def test_acroform_fill_end_to_end_through_converter(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
+ source_pdf = _run_local_pdf_path(monkeypatch, tmp_path, "wr_e2e_acroform", "form.pdf")
+ _write_fillable_pdf(source_pdf)
+
+ async def _llm_response(**_: Any) -> dict[str, Any]:
+ return {"fields": {"name": "Jane A Doe", "subscribe": True}, "thought": "mapped"}
+
+ block = _build_pdf_fill_block(monkeypatch, tmp_path)
+ context = _install_fake_context(monkeypatch, values={"source_pdf": str(source_pdf)})
+ monkeypatch.setattr(PdfFillBlock, "_resolve_default_llm_handler", AsyncMock(return_value=_llm_response))
+
+ result = await block.execute(workflow_run_id="wr_e2e_acroform", workflow_run_block_id="", organization_id=None)
+
+ assert result.success is True
+ assert result.status == BlockStatus.completed
+ output = result.output_parameter_value
+ assert output["fill_mode"] == "acroform"
+ filled_fields = PdfReader(output["file_path"]).get_fields()
+ assert filled_fields["name"]["/V"] == "Jane A Doe"
+ assert filled_fields["subscribe"]["/V"] == "/Yes"
+ assert context.values["fill_form_output"]["fill_mode"] == "acroform"
+
+
+async def test_flat_fill_end_to_end_with_fake_tesseract(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
+ source_pdf = _run_local_pdf_path(monkeypatch, tmp_path, "wr_e2e_flat", "flat.pdf")
+ _write_flat_pdf(source_pdf)
+
+ # The 300x200pt flat fixture renders to 625x417px at 150dpi; the TSV mirrors a real tesseract run.
+ tsv = (
+ "level\tpage_num\tblock_num\tpar_num\tline_num\tword_num\tleft\ttop\twidth\theight\tconf\ttext\n"
+ "1\t1\t0\t0\t0\t0\t0\t0\t625\t417\t-1\t\n"
+ "5\t1\t1\t1\t1\t1\t40\t60\t60\t14\t92.0\tName:\n"
+ )
+
+ class FakeProcess:
+ returncode = 0
+
+ async def communicate(self) -> tuple[bytes, bytes]:
+ return tsv.encode(), b""
+
+ def kill(self) -> None:
+ pass
+
+ async def wait(self) -> int:
+ return 0
+
+ async def fake_subprocess(*_args: Any, **_kwargs: Any) -> FakeProcess:
+ return FakeProcess()
+
+ async def _llm_response(**_: Any) -> dict[str, Any]:
+ return {"placements": [{"anchor_id": 0, "value": "Jane A Doe", "position": "right"}], "thought": "placed"}
+
+ block = _build_pdf_fill_block(monkeypatch, tmp_path)
+ context = _install_fake_context(monkeypatch, values={"source_pdf": str(source_pdf)})
+ monkeypatch.setattr(PdfFillBlock, "_tesseract_available", staticmethod(lambda: True))
+ monkeypatch.setattr(
+ "skyvern.forge.sdk.workflow.models.pdf_fill_block.asyncio.create_subprocess_exec", fake_subprocess
+ )
+ monkeypatch.setattr(PdfFillBlock, "_resolve_default_llm_handler", AsyncMock(return_value=_llm_response))
+
+ result = await block.execute(workflow_run_id="wr_e2e_flat", workflow_run_block_id="", organization_id=None)
+
+ assert result.success is True
+ output = result.output_parameter_value
+ assert output["fill_mode"] == "flat_overlay"
+ assert output["fields"] == {"Name:": "Jane A Doe"}
+ with pdfplumber.open(output["file_path"]) as pdf:
+ words = {w["text"] for w in pdf.pages[0].extract_words()}
+ assert "Jane" in words
+ assert context.values["fill_form_output"]["fill_mode"] == "flat_overlay"
+
+
+async def test_file_url_unwraps_upstream_block_output(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
+ source_pdf = _run_local_pdf_path(monkeypatch, tmp_path, "wr_e2e_chained", "form.pdf")
+ _write_fillable_pdf(source_pdf)
+
+ async def _llm_response(**_: Any) -> dict[str, Any]:
+ return {"fields": {"name": "Jane A Doe"}, "thought": "mapped"}
+
+ block = _build_pdf_fill_block(monkeypatch, tmp_path, file_url="downloader_output")
+ _install_fake_context(
+ monkeypatch,
+ values={"downloader_output": {"downloaded_files": [{"url": str(source_pdf)}]}},
+ )
+ monkeypatch.setattr(PdfFillBlock, "_resolve_default_llm_handler", AsyncMock(return_value=_llm_response))
+
+ result = await block.execute(workflow_run_id="wr_e2e_chained", workflow_run_block_id="", organization_id=None)
+
+ assert result.success is True
+ assert PdfReader(result.output_parameter_value["file_path"]).get_fields()["name"]["/V"] == "Jane A Doe"
diff --git a/tests/unit/test_script_service_fallback_engine.py b/tests/unit/test_script_service_fallback_engine.py
new file mode 100644
index 000000000..7b46cc35d
--- /dev/null
+++ b/tests/unit/test_script_service_fallback_engine.py
@@ -0,0 +1,192 @@
+"""Tests for engine inheritance in script_service._fallback_to_ai_run.
+
+When a cached script block fails and falls back to the agent, the fallback TaskBlock must
+inherit the engine configured on the original block in the run-bound workflow definition,
+not silently pin to skyvern_v1.
+"""
+
+from __future__ import annotations
+
+from datetime import datetime, timezone
+from types import SimpleNamespace
+from unittest.mock import AsyncMock, MagicMock, patch
+
+import pytest
+
+from skyvern.forge.sdk.core.skyvern_context import SkyvernContext
+from skyvern.forge.sdk.workflow.models.block import TaskBlock
+from skyvern.forge.sdk.workflow.models.parameter import OutputParameter, ParameterType
+from skyvern.forge.sdk.workflow.models.workflow import Workflow, WorkflowDefinition
+from skyvern.schemas.runs import RunEngine
+from skyvern.schemas.workflows import BlockType
+from skyvern.services import script_service
+
+MODULE = "skyvern.services.script_service"
+
+
+def _make_output_parameter(key: str) -> OutputParameter:
+ now = datetime.now(timezone.utc)
+ return OutputParameter(
+ parameter_type=ParameterType.OUTPUT,
+ key=key,
+ output_parameter_id=f"op_{key}",
+ workflow_id="w_test",
+ created_at=now,
+ modified_at=now,
+ )
+
+
+def _make_task_block(label: str, engine: RunEngine = RunEngine.skyvern_v1) -> TaskBlock:
+ return TaskBlock(
+ label=label,
+ output_parameter=_make_output_parameter(f"{label}_output"),
+ title=label,
+ engine=engine,
+ )
+
+
+def _make_workflow(blocks: list[TaskBlock]) -> Workflow:
+ now = datetime.now(timezone.utc)
+ return Workflow(
+ workflow_id="w_test",
+ organization_id="o_test",
+ title="test workflow",
+ workflow_permanent_id="wpid_test",
+ version=1,
+ is_saved_task=False,
+ workflow_definition=WorkflowDefinition(parameters=[], blocks=blocks),
+ created_at=now,
+ modified_at=now,
+ )
+
+
+def _make_context() -> SkyvernContext:
+ return SkyvernContext(
+ organization_id="o_test",
+ workflow_run_id="wr_test",
+ workflow_id="w_test",
+ task_id="tsk_test",
+ step_id="stp_test",
+ )
+
+
+def _make_app(workflow: Workflow) -> MagicMock:
+ app = MagicMock()
+ app.DATABASE.tasks.update_step = AsyncMock(return_value=SimpleNamespace(order=0))
+ app.DATABASE.organizations.get_organization = AsyncMock(return_value=SimpleNamespace())
+ app.DATABASE.tasks.get_task = AsyncMock(return_value=SimpleNamespace(url="https://example.com"))
+ app.DATABASE.workflows.get_workflow = AsyncMock(return_value=workflow)
+ app.DATABASE.workflow_runs.get_workflow_run = AsyncMock(return_value=SimpleNamespace(ai_fallback=True))
+ app.DATABASE.tasks.create_step = AsyncMock(return_value=SimpleNamespace(step_id="stp_ai_1"))
+ app.DATABASE.workflow_runs.update_workflow_run = AsyncMock()
+ app.agent.execute_step = AsyncMock()
+ return app
+
+
+async def _run_fallback(cache_key: str, workflow: Workflow, engine: RunEngine = RunEngine.skyvern_v1) -> MagicMock:
+ """Run `_fallback_to_ai_run` against `workflow` and return the mocked app for assertions."""
+ app = _make_app(workflow)
+ with (
+ patch(f"{MODULE}.app", app),
+ patch(f"{MODULE}.skyvern_context.current", return_value=_make_context()),
+ ):
+ await script_service._fallback_to_ai_run(
+ block_type=BlockType.NAVIGATION,
+ cache_key=cache_key,
+ prompt="do the thing",
+ engine=engine,
+ )
+ return app
+
+
+def _fallback_task_block(app: MagicMock) -> TaskBlock:
+ # The dispatch gate reads the engine PARAM, not task_block.engine — assert both stay in sync
+ # so an inert-inheritance regression (block carries v3, dispatch gets default) cannot pass.
+ kwargs = app.agent.execute_step.call_args.kwargs
+ assert kwargs["engine"] == kwargs["task_block"].engine
+ return kwargs["task_block"]
+
+
+async def test_fallback_inherits_engine_from_run_bound_definition() -> None:
+ workflow = _make_workflow([_make_task_block("my_block", engine=RunEngine.skyvern_v3)])
+
+ app = await _run_fallback("my_block", workflow)
+
+ assert _fallback_task_block(app).engine == RunEngine.skyvern_v3
+
+
+async def test_fallback_keeps_default_engine_when_block_engine_is_default() -> None:
+ workflow = _make_workflow([_make_task_block("my_block", engine=RunEngine.skyvern_v1)])
+
+ app = await _run_fallback("my_block", workflow)
+
+ assert _fallback_task_block(app).engine == RunEngine.skyvern_v1
+
+
+async def test_fallback_keeps_default_engine_when_block_missing_from_definition() -> None:
+ workflow = _make_workflow([_make_task_block("other_block", engine=RunEngine.skyvern_v3)])
+
+ app = await _run_fallback("my_block", workflow)
+
+ assert _fallback_task_block(app).engine == RunEngine.skyvern_v1
+
+
+async def test_fallback_fails_open_to_default_when_engine_lookup_raises() -> None:
+ workflow = _make_workflow([_make_task_block("my_block", engine=RunEngine.skyvern_v3)])
+ app = _make_app(workflow)
+
+ with (
+ patch(f"{MODULE}.app", app),
+ patch(f"{MODULE}.skyvern_context.current", return_value=_make_context()),
+ patch(f"{MODULE}._resolve_original_block_engine", side_effect=RuntimeError("boom")),
+ ):
+ await script_service._fallback_to_ai_run(
+ block_type=BlockType.NAVIGATION,
+ cache_key="my_block",
+ prompt="do the thing",
+ )
+
+ assert _fallback_task_block(app).engine == RunEngine.skyvern_v1
+
+
+async def test_fallback_respects_explicit_engine_without_lookup() -> None:
+ workflow = _make_workflow([_make_task_block("my_block", engine=RunEngine.skyvern_v3)])
+ app = _make_app(workflow)
+
+ with (
+ patch(f"{MODULE}.app", app),
+ patch(f"{MODULE}.skyvern_context.current", return_value=_make_context()),
+ patch(f"{MODULE}._resolve_original_block_engine") as resolve_mock,
+ ):
+ await script_service._fallback_to_ai_run(
+ block_type=BlockType.NAVIGATION,
+ cache_key="my_block",
+ prompt="do the thing",
+ engine=RunEngine.skyvern_v2,
+ )
+
+ resolve_mock.assert_not_called()
+ assert _fallback_task_block(app).engine == RunEngine.skyvern_v2
+
+
+def test_resolver_finds_loop_nested_block_engine() -> None:
+ # A cached block inside a for-loop must keep its configured engine on fallback; the lookup
+ # is recursive (labels are globally unique, nested included).
+ from skyvern.forge.sdk.workflow.models.block import ForLoopBlock
+
+ nested = _make_task_block("inner_block", RunEngine.skyvern_v3)
+ loop = ForLoopBlock(
+ label="outer_loop",
+ loop_blocks=[nested],
+ loop_over=None,
+ loop_variable_reference="items",
+ output_parameter=nested.output_parameter,
+ )
+ workflow = _make_workflow([loop])
+ assert script_service._resolve_original_block_engine("inner_block", workflow) == RunEngine.skyvern_v3
+ assert script_service._resolve_original_block_engine("missing", workflow) is None
diff --git a/tests/unit/test_secret_artifact_redaction_wiring.py b/tests/unit/test_secret_artifact_redaction_wiring.py
index 4a8a6bad9..65baae4c6 100644
--- a/tests/unit/test_secret_artifact_redaction_wiring.py
+++ b/tests/unit/test_secret_artifact_redaction_wiring.py
@@ -5,27 +5,32 @@ from unittest.mock import AsyncMock, Mock
import pytest
from skyvern.forge.sdk.artifact.models import ArtifactType
+from skyvern.forge.sdk.core import skyvern_context
+from skyvern.forge.sdk.core.skyvern_context import SkyvernContext
+from skyvern.forge.sdk.workflow import context_manager as context_manager_module
from skyvern.forge.sdk.workflow import service as workflow_service_module
+from skyvern.forge.sdk.workflow.context_manager import WorkflowContextManager
from skyvern.forge.sdk.workflow.service import WorkflowService
from skyvern.utils.secret_redaction import REDACTED_SECRET_PLACEHOLDER
SECRET = "hunter2secret"
+RUNTIME_SECRET = "runtime-otp-999111"
WORKFLOW_RUN_ID = "wr_secret_redaction"
-def _har_bytes() -> bytes:
+def _har_bytes(secret: str = SECRET) -> bytes:
return json.dumps(
{
"log": {
"entries": [
{
"request": {
- "url": f"https://example.test/path?token={SECRET}",
+ "url": f"https://example.test/path?token={secret}",
"headers": [
- {"name": "Authorization", "value": f"Bearer {SECRET}"},
+ {"name": "Authorization", "value": f"Bearer {secret}"},
{"name": "X-Safe", "value": "safe"},
],
- "cookies": [{"name": "session", "value": SECRET}],
+ "cookies": [{"name": "session", "value": secret}],
},
"response": {"headers": [], "cookies": []},
}
@@ -39,6 +44,7 @@ def _fake_app(
har_data: bytes = b"",
browser_log: bytes = b"",
redaction_enabled: bool = True,
+ runtime_secret_values: set[str] | None = None,
) -> SimpleNamespace:
return SimpleNamespace(
BROWSER_MANAGER=SimpleNamespace(
@@ -52,6 +58,7 @@ def _fake_app(
WORKFLOW_CONTEXT_MANAGER=SimpleNamespace(
secret_redaction_enabled_for_run=Mock(return_value=redaction_enabled),
get_secret_values_for_run=Mock(return_value={SECRET}),
+ runtime_secret_values_for_artifacts=Mock(return_value=set(runtime_secret_values or set())),
),
)
@@ -76,6 +83,7 @@ async def test_persist_har_data_redacts_secret_and_sensitive_header(monkeypatch:
fake_app.WORKFLOW_CONTEXT_MANAGER.secret_redaction_enabled_for_run.assert_called_once_with(WORKFLOW_RUN_ID)
fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_called_once_with(WORKFLOW_RUN_ID)
+ fake_app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts.assert_not_called()
fake_app.ARTIFACT_MANAGER.create_artifact.assert_awaited_once()
artifact_kwargs = fake_app.ARTIFACT_MANAGER.create_artifact.await_args.kwargs
stored_data = artifact_kwargs["data"]
@@ -102,6 +110,7 @@ async def test_persist_har_data_skips_all_redaction_when_run_not_opted_in(
await service.persist_har_data(browser_state, last_step, workflow, workflow_run)
fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_not_called()
+ fake_app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts.assert_called_once()
artifact_kwargs = fake_app.ARTIFACT_MANAGER.create_artifact.await_args.kwargs
stored_data = artifact_kwargs["data"]
request = json.loads(stored_data)["log"]["entries"][0]["request"]
@@ -110,6 +119,29 @@ async def test_persist_har_data_skips_all_redaction_when_run_not_opted_in(
assert request["headers"][0]["value"] == f"Bearer {SECRET}"
+async def test_persist_har_data_redacts_runtime_secret_when_not_opted_in(monkeypatch: pytest.MonkeyPatch) -> None:
+ fake_app = _fake_app(
+ har_data=_har_bytes(RUNTIME_SECRET),
+ redaction_enabled=False,
+ runtime_secret_values={RUNTIME_SECRET},
+ )
+ monkeypatch.setattr(workflow_service_module, "app", fake_app)
+
+ browser_state, last_step, workflow, workflow_run = _workflow_objects()
+ service = WorkflowService()
+
+ await service.persist_har_data(browser_state, last_step, workflow, workflow_run)
+
+ fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_not_called()
+ fake_app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts.assert_called_once()
+ artifact_kwargs = fake_app.ARTIFACT_MANAGER.create_artifact.await_args.kwargs
+ stored_data = artifact_kwargs["data"]
+
+ assert REDACTED_SECRET_PLACEHOLDER.encode() in stored_data
+ assert RUNTIME_SECRET.encode() not in stored_data
+
+
@pytest.mark.asyncio
async def test_persist_browser_console_log_redacts_secret(monkeypatch: pytest.MonkeyPatch) -> None:
fake_app = _fake_app(browser_log=f"console leaked {SECRET}".encode())
@@ -121,6 +153,7 @@ async def test_persist_browser_console_log_redacts_secret(monkeypatch: pytest.Mo
await service.persist_browser_console_log(browser_state, last_step, workflow, workflow_run)
fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_called_once_with(WORKFLOW_RUN_ID)
+ fake_app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts.assert_not_called()
fake_app.ARTIFACT_MANAGER.create_artifact.assert_awaited_once()
artifact_kwargs = fake_app.ARTIFACT_MANAGER.create_artifact.await_args.kwargs
stored_data = artifact_kwargs["data"]
@@ -130,6 +163,31 @@ async def test_persist_browser_console_log_redacts_secret(monkeypatch: pytest.Mo
assert SECRET.encode() not in stored_data
+async def test_persist_browser_console_log_redacts_runtime_secret_when_not_opted_in(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ fake_app = _fake_app(
+ browser_log=f"console leaked {RUNTIME_SECRET}".encode(),
+ redaction_enabled=False,
+ runtime_secret_values={RUNTIME_SECRET},
+ )
+ monkeypatch.setattr(workflow_service_module, "app", fake_app)
+
+ browser_state, last_step, workflow, workflow_run = _workflow_objects()
+ service = WorkflowService()
+
+ await service.persist_browser_console_log(browser_state, last_step, workflow, workflow_run)
+
+ fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_not_called()
+ fake_app.ARTIFACT_MANAGER.create_artifact.assert_awaited_once()
+ artifact_kwargs = fake_app.ARTIFACT_MANAGER.create_artifact.await_args.kwargs
+ stored_data = artifact_kwargs["data"]
+
+ assert REDACTED_SECRET_PLACEHOLDER.encode() in stored_data
+ assert RUNTIME_SECRET.encode() not in stored_data
+
+
@pytest.mark.asyncio
async def test_bundled_debug_artifacts_redact_har_and_console_log(monkeypatch: pytest.MonkeyPatch) -> None:
fake_app = _fake_app(har_data=_har_bytes(), browser_log=f"console leaked {SECRET}".encode())
@@ -140,6 +198,7 @@ async def test_bundled_debug_artifacts_redact_har_and_console_log(monkeypatch: p
await service._persist_debug_artifacts_bundled(browser_state, last_step, workflow, workflow_run)
+ fake_app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts.assert_not_called()
fake_app.ARTIFACT_MANAGER.create_task_archive.assert_awaited_once()
entries = fake_app.ARTIFACT_MANAGER.create_task_archive.await_args.kwargs["entries"]
_, har_data = entries["har.har"]
@@ -149,3 +208,121 @@ async def test_bundled_debug_artifacts_redact_har_and_console_log(monkeypatch: p
assert REDACTED_SECRET_PLACEHOLDER.encode() in browser_log
assert SECRET.encode() not in har_data
assert SECRET.encode() not in browser_log
+
+
+async def test_bundled_debug_artifacts_skip_redaction_when_not_opted_in(monkeypatch: pytest.MonkeyPatch) -> None:
+ original_har = _har_bytes()
+ original_log = f"console leaked {SECRET}".encode()
+ fake_app = _fake_app(har_data=original_har, browser_log=original_log, redaction_enabled=False)
+ monkeypatch.setattr(workflow_service_module, "app", fake_app)
+
+ browser_state, last_step, workflow, workflow_run = _workflow_objects()
+ service = WorkflowService()
+
+ await service._persist_debug_artifacts_bundled(browser_state, last_step, workflow, workflow_run)
+
+ fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_not_called()
+ fake_app.WORKFLOW_CONTEXT_MANAGER.runtime_secret_values_for_artifacts.assert_called_once()
+ entries = fake_app.ARTIFACT_MANAGER.create_task_archive.await_args.kwargs["entries"]
+ _, har_data = entries["har.har"]
+ _, browser_log = entries["browser_console.log"]
+
+ assert har_data == original_har
+ assert browser_log == original_log
+
+
+async def test_bundled_debug_artifacts_redact_runtime_secret_when_not_opted_in(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ fake_app = _fake_app(
+ har_data=_har_bytes(RUNTIME_SECRET),
+ browser_log=f"console leaked {RUNTIME_SECRET}".encode(),
+ redaction_enabled=False,
+ runtime_secret_values={RUNTIME_SECRET},
+ )
+ monkeypatch.setattr(workflow_service_module, "app", fake_app)
+
+ browser_state, last_step, workflow, workflow_run = _workflow_objects()
+ service = WorkflowService()
+
+ await service._persist_debug_artifacts_bundled(browser_state, last_step, workflow, workflow_run)
+
+ fake_app.WORKFLOW_CONTEXT_MANAGER.get_secret_values_for_run.assert_not_called()
+ entries = fake_app.ARTIFACT_MANAGER.create_task_archive.await_args.kwargs["entries"]
+ _, har_data = entries["har.har"]
+ _, browser_log = entries["browser_console.log"]
+
+ assert REDACTED_SECRET_PLACEHOLDER.encode() in har_data
+ assert REDACTED_SECRET_PLACEHOLDER.encode() in browser_log
+ assert RUNTIME_SECRET.encode() not in har_data
+ assert RUNTIME_SECRET.encode() not in browser_log
+
+
+async def test_runtime_secret_values_for_artifacts_respects_global_switch(monkeypatch: pytest.MonkeyPatch) -> None:
+ # The runtime-only floor is gated on the global kill switch alone (no per-run opt-in), mirroring
+ # the bare-task principle in WorkflowContextManager.get_secret_values_for_run.
+ monkeypatch.setattr(context_manager_module.settings, "ENABLE_SECRET_ARTIFACT_REDACTION", True)
+ context = SkyvernContext(organization_id="org_1")
+ context.register_secret_value(RUNTIME_SECRET)
+ skyvern_context.set(context)
+ try:
+ manager = WorkflowContextManager()
+ assert manager.runtime_secret_values_for_artifacts() == {RUNTIME_SECRET}
+
+ monkeypatch.setattr(context_manager_module.settings, "ENABLE_SECRET_ARTIFACT_REDACTION", False)
+ assert manager.runtime_secret_values_for_artifacts() == set()
+ finally:
+ skyvern_context.reset()
+
+ monkeypatch.setattr(context_manager_module.settings, "ENABLE_SECRET_ARTIFACT_REDACTION", True)
+ assert skyvern_context.current() is None
+ assert WorkflowContextManager().runtime_secret_values_for_artifacts() == set()
+
+
+def test_task_artifact_gate_floors_runtime_secret_for_har_and_console(monkeypatch: pytest.MonkeyPatch) -> None:
+ # Task-level HAR/console persistence goes through _maybe_redact_artifact_data; a mask-off
+ # workflow must still have runtime-resolved secrets floored there (llm surfaces stay gated).
+ from skyvern.forge.sdk.artifact import manager as artifact_manager_module
+
+ fake_app = SimpleNamespace(
+ WORKFLOW_CONTEXT_MANAGER=SimpleNamespace(
+ artifact_redaction_enabled=Mock(return_value=False),
+ get_secret_values_for_run=Mock(side_effect=AssertionError("gated set must not be consulted")),
+ runtime_secret_values_for_artifacts=Mock(return_value={RUNTIME_SECRET}),
+ )
+ )
+ monkeypatch.setattr(artifact_manager_module, "app", fake_app)
+ skyvern_context.set(SkyvernContext(workflow_run_id=WORKFLOW_RUN_ID))
+ try:
+ har_out = artifact_manager_module._maybe_redact_artifact_data(
+ ArtifactType.HAR, _har_bytes(RUNTIME_SECRET), WORKFLOW_RUN_ID
+ )
+ console_out = artifact_manager_module._maybe_redact_artifact_data(
+ ArtifactType.BROWSER_CONSOLE_LOG, f"code={RUNTIME_SECRET}".encode(), WORKFLOW_RUN_ID
+ )
+ llm_out = artifact_manager_module._maybe_redact_artifact_data(
+ ArtifactType.LLM_REQUEST, f"code={RUNTIME_SECRET}".encode(), WORKFLOW_RUN_ID
+ )
+ finally:
+ skyvern_context.reset()
+ assert RUNTIME_SECRET.encode() not in har_out
+ assert RUNTIME_SECRET.encode() not in console_out
+ assert llm_out == f"code={RUNTIME_SECRET}".encode()
+
+
+def test_task_artifact_gate_untouched_when_no_runtime_secrets(monkeypatch: pytest.MonkeyPatch) -> None:
+ from skyvern.forge.sdk.artifact import manager as artifact_manager_module
+
+ fake_app = SimpleNamespace(
+ WORKFLOW_CONTEXT_MANAGER=SimpleNamespace(
+ artifact_redaction_enabled=Mock(return_value=False),
+ runtime_secret_values_for_artifacts=Mock(return_value=set()),
+ )
+ )
+ monkeypatch.setattr(artifact_manager_module, "app", fake_app)
+ payload = _har_bytes(SECRET)
+ out = artifact_manager_module._maybe_redact_artifact_data(ArtifactType.HAR, payload, WORKFLOW_RUN_ID)
+ assert out == payload
diff --git a/tests/unit/test_self_host_artifact_url_fallback.py b/tests/unit/test_self_host_artifact_url_fallback.py
index 96fdc4d55..f427a5c31 100644
--- a/tests/unit/test_self_host_artifact_url_fallback.py
+++ b/tests/unit/test_self_host_artifact_url_fallback.py
@@ -306,6 +306,7 @@ class TestFlushStepArchiveUnbundled:
WORKFLOW_CONTEXT_MANAGER=SimpleNamespace(
artifact_redaction_enabled=MagicMock(return_value=False),
secret_redaction_enabled_for_run=MagicMock(return_value=False),
+ runtime_secret_values_for_artifacts=MagicMock(return_value=set()),
),
)
task = SimpleNamespace(task_id=step.task_id, organization_id=step.organization_id)
diff --git a/tests/unit/test_taskv3_auth_tools.py b/tests/unit/test_taskv3_auth_tools.py
index fb114bbdd..f62fc9cdb 100644
--- a/tests/unit/test_taskv3_auth_tools.py
+++ b/tests/unit/test_taskv3_auth_tools.py
@@ -4,7 +4,7 @@ from __future__ import annotations
from types import SimpleNamespace
from typing import Any
-from unittest.mock import AsyncMock
+from unittest.mock import AsyncMock, MagicMock
import pytest
@@ -12,7 +12,7 @@ from skyvern.forge.sdk.core import skyvern_context
from skyvern.forge.sdk.core.skyvern_context import SkyvernContext
from skyvern.forge.sdk.schemas.totp_codes import OTPType
from skyvern.forge.sdk.workflow import context_manager as cm
-from skyvern.forge.sdk.workflow.context_manager import WorkflowContextManager
+from skyvern.forge.sdk.workflow.context_manager import WorkflowContextManager, WorkflowRunContext
from skyvern.forge.taskv3 import auth_tools
from skyvern.services import otp_service
from skyvern.services.otp_service import OTPValue
@@ -183,6 +183,45 @@ def test_get_secret_values_for_run_standalone_task_uses_global_artifact_redactio
skyvern_context.reset()
+def _workflow_run_context_with_totp_credentials() -> WorkflowRunContext:
+ workflow_run_context = WorkflowRunContext(
+ workflow_title="t",
+ workflow_id="w_test",
+ workflow_permanent_id="wp_test",
+ workflow_run_id="wr_test",
+ aws_client=MagicMock(),
+ )
+ workflow_run_context.values["cred_1"] = {"totp": "totp_id_1"}
+ workflow_run_context.values["cred_2"] = {"totp": "totp_id_2"}
+ workflow_run_context.secrets["totp_id_1_value"] = "SEED_ONE"
+ workflow_run_context.secrets["totp_id_2_value"] = "SEED_TWO"
+ return workflow_run_context
+
+
+def test_try_generate_totp_from_credential_disambiguates_via_active_key(monkeypatch: pytest.MonkeyPatch) -> None:
+ # Two TOTP-bearing credentials in the same run: with no active credential, resolution is
+ # ambiguous and yields nothing; active_credential_parameter_key (set by _execute_task_v3 for a
+ # single-login-credential block) must select exactly that credential's TOTP secret, not the other.
+ monkeypatch.setattr(otp_service, "generate_totp_code", lambda secret: f"code::{secret}")
+ manager = WorkflowContextManager()
+ manager.workflow_run_contexts["wr_test"] = _workflow_run_context_with_totp_credentials()
+ monkeypatch.setattr(otp_service.app, "WORKFLOW_CONTEXT_MANAGER", manager)
+
+ skyvern_context.set(SkyvernContext(workflow_run_id="wr_test"))
+ try:
+ assert otp_service.try_generate_totp_from_credential("wr_test") is None
+ finally:
+ skyvern_context.reset()
+
+ skyvern_context.set(SkyvernContext(workflow_run_id="wr_test", active_credential_parameter_key="cred_2"))
+ try:
+ otp = otp_service.try_generate_totp_from_credential("wr_test")
+ finally:
+ skyvern_context.reset()
+ assert otp is not None
+ assert otp.value == "code::SEED_TWO"
+
+
def test_get_secret_values_for_run_standalone_task_respects_disabled_global_artifact_redaction(
monkeypatch: pytest.MonkeyPatch,
) -> None:
diff --git a/tests/unit/test_taskv3_engine.py b/tests/unit/test_taskv3_engine.py
index 9a28d8bd1..0253499b7 100644
--- a/tests/unit/test_taskv3_engine.py
+++ b/tests/unit/test_taskv3_engine.py
@@ -7,6 +7,7 @@ from the tools test, so the engine's wiring is exercised without a real LLM or b
from __future__ import annotations
import json
+from typing import Any
import pytest
@@ -19,8 +20,9 @@ from skyvern.forge.taskv3.engine import (
run_task_v3_agent_loop,
taskv3_runaway_backstops,
)
+from skyvern.forge.taskv3.tools import PAGE_UNAVAILABLE_ERROR
from tests.unit.test_taskv3_loop import _ScriptedCaller
-from tests.unit.test_taskv3_tools import _FakePage
+from tests.unit.test_taskv3_tools import _FakePage, _fixed_page_provider
@pytest.mark.asyncio
@@ -34,7 +36,7 @@ async def test_engine_completes_after_acting() -> None:
caller = _ScriptedCaller(script)
page = _FakePage()
outcome = await run_task_v3_agent_loop(
- page=page,
+ page_provider=_fixed_page_provider(page),
llm_caller=caller,
goal="Fill the application form and stop before submitting.",
parameters={"first_name": "John"},
@@ -51,7 +53,9 @@ async def test_engine_completes_after_acting() -> None:
async def test_engine_accepts_first_finish() -> None:
script = [[("finish", {"status": "completed", "reason": "done"})]]
caller = _ScriptedCaller(script)
- outcome = await run_task_v3_agent_loop(page=_FakePage(), llm_caller=caller, goal="noop")
+ outcome = await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=caller, goal="noop"
+ )
assert outcome.status == "completed" and outcome.turns == 1
@@ -59,14 +63,16 @@ async def test_engine_accepts_first_finish() -> None:
async def test_engine_terminate_accepted_immediately() -> None:
script = [[("finish", {"status": "terminated", "reason": "CAPTCHA blocks the form"})]]
caller = _ScriptedCaller(script)
- outcome = await run_task_v3_agent_loop(page=_FakePage(), llm_caller=caller, goal="apply")
+ outcome = await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=caller, goal="apply"
+ )
assert outcome.status == "terminated" and outcome.turns == 1
@pytest.mark.asyncio
async def test_engine_exposes_browser_and_finish_tools_no_task_ecosystem() -> None:
caller = _ScriptedCaller([[("finish", {"status": "completed", "reason": "x"})]])
- await run_task_v3_agent_loop(page=_FakePage(), llm_caller=caller, goal="x")
+ await run_task_v3_agent_loop(page_provider=_fixed_page_provider(_FakePage()), llm_caller=caller, goal="x")
sent = {t["function"]["name"] for t in (caller.sent_tools or [])}
assert {"observe", "type", "click", "file_upload", "finish"} <= sent
assert not ({"act", "extract", "validate", "run_task", "login"} & sent)
@@ -82,7 +88,9 @@ async def test_engine_records_billable_actions() -> None:
[("finish", {"status": "completed", "reason": "done"})],
]
caller = _ScriptedCaller(script)
- outcome = await run_task_v3_agent_loop(page=_FakePage(), llm_caller=caller, goal="apply")
+ outcome = await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=caller, goal="apply"
+ )
assert outcome.status == "completed"
assert outcome.billable_actions == ["type", "click"]
@@ -102,7 +110,9 @@ async def test_engine_wires_budget_and_retry_defaults(monkeypatch: pytest.Monkey
return LoopOutcome(status="completed", reason="ok")
monkeypatch.setattr(engine_mod, "run_agent_tool_loop", _capture)
- await run_task_v3_agent_loop(page=_FakePage(), llm_caller=_ScriptedCaller([]), goal="x")
+ await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=_ScriptedCaller([]), goal="x"
+ )
assert captured["max_tokens"] == engine_mod.DEFAULT_MAX_TOKENS
assert captured["deadline_seconds"] == engine_mod.DEFAULT_DEADLINE_SECONDS
@@ -128,6 +138,28 @@ def test_runaway_backstops_scale_with_action_step_budget() -> None:
assert t_big >= t_small and c_big >= c_small
+async def test_engine_page_lost_fails_cleanly_not_hang() -> None:
+ # A provider that never resolves a page (browser truly gone): every browser tool call errors
+ # with a browser-lost reason, and the loop's existing action-step/turn backstops guarantee a
+ # bounded, clean failure -- no hang, and no new termination mechanism was needed for it.
+ async def gone_provider() -> Any:
+ return None
+
+ script = [[("click", {"selector": "#x"})]] * 10 # keeps retrying; would never finish on its own
+ caller = _ScriptedCaller(script)
+ outcome = await run_task_v3_agent_loop(
+ page_provider=gone_provider,
+ llm_caller=caller,
+ goal="apply",
+ max_action_steps=2,
+ max_turns=20,
+ )
+ assert outcome.status == "budget_exhausted"
+ tool_messages = [m for m in outcome.messages if m.get("role") == "tool"]
+ assert any(m["content"] == PAGE_UNAVAILABLE_ERROR for m in tool_messages)
+
+
@pytest.mark.parametrize(
"payload, expected",
[
@@ -147,3 +179,169 @@ def test_runaway_backstops_scale_with_action_step_budget() -> None:
)
def test_coerce_v3_parameters_surfaces_payload_regardless_of_type(payload: object, expected: object) -> None:
assert coerce_v3_parameters(payload) == expected
+
+
+async def test_page_free_mode_has_no_browser_tools_and_page_free_prompt() -> None:
+ # Structural, not advisory: a page-free run exposes no perception/action tools, its system
+ # prompt never instructs observing, and an attempted observe is an unknown tool.
+ script = [[("observe", {})], [("finish", {"status": "completed", "reason": "criteria hold"})]]
+ caller = _ScriptedCaller(script)
+
+ async def no_page() -> Any:
+ raise AssertionError("page provider must never be consulted in page-free mode")
+
+ outcome = await run_task_v3_agent_loop(
+ page_provider=no_page,
+ llm_caller=caller,
+ goal="assess",
+ page_free=True,
+ max_action_steps=2,
+ max_turns=6,
+ )
+ assert outcome.status == "completed"
+ tool_messages = [m["content"] for m in outcome.messages if m.get("role") == "tool"]
+ assert any("unknown_tool: observe" in c for c in tool_messages)
+ system_message = next(m for m in outcome.messages if m.get("role") == "system")
+ assert "NO browser tools" in system_message["content"]
+ assert "Perceive with" not in system_message["content"]
+
+
+async def test_engine_defers_completion_while_delayed_render_settles() -> None:
+ # Regression for the fixture's delayed-states pattern: a panel's data loads AFTER a delay, and
+ # a completion verdict issued mid-render must be deferred until two DOM samples match. The fake
+ # page mutates its DOM signature once (the delayed load landing), like the fixture's
+ # loading -> loaded transition.
+ settle_results = iter([False, True])
+
+ async def settle_probe() -> bool:
+ # Models the fixture's delayed load: the first sample pair differs (mid-render), the
+ # second matches (loaded panel).
+ return next(settle_results, True)
+
+ async def provider() -> Any:
+ return object()
+
+ script = [
+ [("finish", {"status": "completed", "reason": "panel visible"})],
+ [("finish", {"status": "completed", "reason": "panel content confirmed"})],
+ ]
+ caller = _ScriptedCaller(script)
+ outcome = await run_task_v3_agent_loop(
+ page_provider=provider,
+ llm_caller=caller,
+ goal="open the panel",
+ settle_probe=settle_probe,
+ max_action_steps=2,
+ max_turns=8,
+ )
+ assert outcome.status == "completed"
+ assert outcome.reason == "panel content confirmed"
+
+
+async def test_page_free_mode_finishes_without_settle_probe() -> None:
+ # Page-free runs have no page to settle: finish(completed) is immediate and the provider is
+ # never consulted.
+ async def no_page() -> Any:
+ raise AssertionError("provider must not be consulted in page-free mode")
+
+ script = [[("finish", {"status": "completed", "reason": "criteria hold"})]]
+ caller = _ScriptedCaller(script)
+ outcome = await run_task_v3_agent_loop(
+ page_provider=no_page,
+ llm_caller=caller,
+ goal="assess",
+ page_free=True,
+ max_action_steps=2,
+ max_turns=4,
+ )
+ assert outcome.status == "completed"
+
+
+async def test_bare_run_finishes_without_settle_probe() -> None:
+ # Fenced: without a settle_probe (the bare-task default) finish(completed) never consults
+ # the page, preserving the live bare-task arm's finish path.
+ probe_calls = 0
+
+ async def counting_probe() -> bool:
+ nonlocal probe_calls
+ probe_calls += 1
+ return False
+
+ async def provider() -> Any:
+ return object()
+
+ script = [[("finish", {"status": "completed", "reason": "done"})]]
+ caller = _ScriptedCaller(script)
+ outcome = await run_task_v3_agent_loop(
+ page_provider=provider, llm_caller=caller, goal="g", max_action_steps=2, max_turns=4
+ )
+ assert outcome.status == "completed"
+ assert probe_calls == 0
+
+
+async def test_engine_omits_tool_choice_by_default(monkeypatch: pytest.MonkeyPatch) -> None:
+ from skyvern.forge.taskv3 import engine as engine_mod
+ from skyvern.forge.taskv3.loop import LoopOutcome
+
+ captured: dict[str, object] = {}
+
+ async def _capture(**kwargs: object) -> LoopOutcome:
+ captured.update(kwargs)
+ return LoopOutcome(status="completed", reason="ok")
+
+ monkeypatch.setattr(engine_mod, "run_agent_tool_loop", _capture)
+ monkeypatch.setattr(engine_mod.settings, "TASK_V3_TOOL_CHOICE_REQUIRED", False)
+
+ await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=_ScriptedCaller([]), goal="x"
+ )
+ # None, not {} -- the loop splats **(call_kwargs or {}), so preserving None keeps the
+ # default (lever-off) path byte-identical to before this lever existed.
+ assert captured["call_kwargs"] is None
+
+ step = object()
+ captured.clear()
+ await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=_ScriptedCaller([]), goal="x", step=step
+ )
+ assert captured["call_kwargs"] == {"step": step}
+
+
+async def test_engine_requests_tool_choice_when_enabled(monkeypatch: pytest.MonkeyPatch) -> None:
+ from skyvern.forge.taskv3 import engine as engine_mod
+ from skyvern.forge.taskv3.loop import LoopOutcome
+
+ captured: dict[str, object] = {}
+
+ async def _capture(**kwargs: object) -> LoopOutcome:
+ captured.update(kwargs)
+ return LoopOutcome(status="completed", reason="ok")
+
+ monkeypatch.setattr(engine_mod, "run_agent_tool_loop", _capture)
+ monkeypatch.setattr(engine_mod.settings, "TASK_V3_TOOL_CHOICE_REQUIRED", True)
+
+ step = object()
+ await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=_ScriptedCaller([]), goal="x", step=step
+ )
+
+ assert captured["call_kwargs"] == {"step": step, "tool_choice": "required"}
+
+ # The engine asking the caller is what keeps tool_choice_in_effect honest rather than
+ # aspirational: a model that cannot take the parameter must not have it added at all.
+ class _UnsupportedCaller(_ScriptedCaller):
+ def supports_tool_choice(self) -> bool:
+ return False
+
+ captured.clear()
+ await run_task_v3_agent_loop(
+ page_provider=_fixed_page_provider(_FakePage()), llm_caller=_UnsupportedCaller([]), goal="x", step=step
+ )
+
+ assert captured["call_kwargs"] == {"step": step}
diff --git a/tests/unit/test_taskv3_loop.py b/tests/unit/test_taskv3_loop.py
index ad2d7e867..f83b26ff5 100644
--- a/tests/unit/test_taskv3_loop.py
+++ b/tests/unit/test_taskv3_loop.py
@@ -13,8 +13,11 @@ from typing import Any
import pytest
+from skyvern.exceptions import SkyvernContextWindowExceededError
+from skyvern.forge.sdk.api.llm.exceptions import LLMProviderErrorRetryableTask
from skyvern.forge.taskv3.loop import (
NO_TOOL_CALL_NUDGE,
+ ToolHandler,
ToolResult,
ToolSpec,
make_finish_tool,
@@ -31,6 +34,9 @@ class _ScriptedCaller:
self.message_history: list[dict[str, Any]] = []
self.sent_tools: list[dict[str, Any]] | None = None
+ def supports_tool_choice(self) -> bool:
+ return True
+
async def call(
self,
*,
@@ -40,6 +46,7 @@ class _ScriptedCaller:
tools: list[dict[str, Any]] | None = None,
use_message_history: bool = False,
raw_response: bool = False,
+ tool_choice: str | None = None,
) -> dict[str, Any]:
self.sent_tools = tools
turn = self._script[self.calls] if self.calls < len(self._script) else []
@@ -562,14 +569,16 @@ async def test_on_action_round_fires_once_per_action_round() -> None:
outcome, _ = await _run(script, [observe, click, type_, make_finish_tool()], on_action_round=_on_round)
assert outcome.status == "completed"
assert len(rounds) == 1
- assert rounds[0] == [("click", {"selector": "#a"}), ("type", {"selector": "#b", "text": "x"})]
+ assert rounds[0] == [("click", {"selector": "#a"}, True), ("type", {"selector": "#b", "text": "x"}, True)]
@pytest.mark.asyncio
-async def test_on_action_round_skips_rounds_with_no_successful_action() -> None:
- rounds: list[list[tuple[str, dict[str, Any]]]] = []
+async def test_on_action_round_fires_for_all_failed_round_with_failure_flag() -> None:
+ # A dispatched billable round consumes budget even when every call errors; it must reach the
+ # callback (flagged unsuccessful) so the round persists into the workflow-run step budget.
+ rounds: list[list[tuple[str, dict[str, Any], bool]]] = []
- async def _on_round(actions: list[tuple[str, dict[str, Any]]]) -> None:
+ async def _on_round(actions: list[tuple[str, dict[str, Any], bool]]) -> None:
rounds.append(actions)
clk: list[tuple[str, dict[str, Any]]] = []
@@ -578,7 +587,8 @@ async def test_on_action_round_skips_rounds_with_no_successful_action() -> None:
script = [[("click", {})], [("finish", {"status": "completed", "reason": "ok"})]]
outcome, _ = await _run(script, [click, make_finish_tool()], on_action_round=_on_round)
assert outcome.status == "completed"
- assert rounds == [] # no successful billable action -> no per-action persistence
+ assert rounds == [[("click", {}, False)]]
+ assert outcome.billable_actions == [] # billing still counts successes only
@pytest.mark.asyncio
@@ -593,3 +603,296 @@ async def test_on_action_round_failure_does_not_abort_run() -> None:
outcome, _ = await _run(script, [click, make_finish_tool()], on_action_round=_boom)
assert outcome.status == "completed" # callback error contained; run still completes
assert len(clk) == 1
+
+
+def _tool_msg(tool_call_id: str, name: str, content: str) -> dict[str, Any]:
+ return {"role": "tool", "tool_call_id": tool_call_id, "name": name, "content": content}
+
+
+def _assistant_turn(*ids: str) -> dict[str, Any]:
+ return {"role": "assistant", "content": None, "tool_calls": [{"id": i} for i in ids]}
+
+
+def test_compact_transcript_elides_superseded_perception() -> None:
+ # Keep the newest snapshot of each tracked tool; elide older ones' content (never remove the message),
+ # and leave untracked results untouched. Round 2 (after the last assistant) supersedes round 1's
+ # observe/get_html. `snapshot_indices` names the successful-perception message indices the loop records.
+ from skyvern.forge.taskv3.loop import _compact_transcript
+
+ messages = [
+ {"role": "system", "content": "sys"},
+ {"role": "user", "content": "goal"},
+ _assistant_turn("a", "b", "c"), # round 1
+ _tool_msg("a", "observe", "OBSERVE_1 " + "x" * 300), # idx 3
+ _tool_msg("b", "get_html", "HTML_1 " + "y" * 300), # idx 4
+ _tool_msg("c", "click", "clicked #x"), # idx 5 (not a snapshot)
+ _assistant_turn("d", "e"), # round 2 (latest)
+ _tool_msg("d", "observe", "OBSERVE_2 latest " + "z" * 300), # idx 7
+ _tool_msg("e", "get_html", "HTML_2 latest " + "w" * 300), # idx 8
+ ]
+ snapshots = {3, 4, 7, 8} # the observe/get_html successes; the click (5) is not a snapshot
+ _compact_transcript(messages, snapshots)
+ by_id = {m["tool_call_id"]: m["content"] for m in messages if m.get("role") == "tool"}
+ assert by_id["a"].startswith("[superseded observe") # older observe elided
+ assert by_id["b"].startswith("[superseded get_html") # older get_html elided
+ assert by_id["c"] == "clicked #x" # untracked result untouched
+ assert by_id["d"].startswith("OBSERVE_2 latest") # newest observe kept intact
+ assert by_id["e"].startswith("HTML_2 latest") # newest get_html kept intact
+ assert snapshots == {7, 8} # elided indices are dropped so a re-run can't re-anchor them
+
+ # Idempotent: a second pass over the (now-reduced) index set changes nothing.
+ snapshot = [m.get("content") for m in messages]
+ _compact_transcript(messages, snapshots)
+ assert [m.get("content") for m in messages] == snapshot
+
+
+def test_compact_transcript_keeps_unread_latest_round() -> None:
+ # A single turn can batch several perception calls; compaction runs before the model reads them, so
+ # the latest round must be kept intact even when it repeats a compactable tool (would otherwise drop
+ # a result the model requested but never saw).
+ from skyvern.forge.taskv3.loop import _compact_transcript
+
+ messages = [
+ {"role": "user", "content": "goal"},
+ _assistant_turn("a", "b"),
+ _tool_msg("a", "get_html", "HTML_A " + "a" * 300), # idx 2
+ _tool_msg("b", "get_html", "HTML_B " + "b" * 300), # idx 3
+ ]
+ _compact_transcript(messages, {2, 3})
+ assert messages[2]["content"].startswith("HTML_A") # both unread → neither elided
+ assert messages[3]["content"].startswith("HTML_B")
+
+
+def test_compact_transcript_skip_stub_does_not_shadow_real_snapshot() -> None:
+ # A skipped/errored perception result is never recorded as a snapshot, so it can't shadow the real
+ # observe from an earlier round — else a failed batch would leave the agent with no page view. The
+ # skip stub (idx 4) is simply absent from the index set regardless of its content.
+ from skyvern.forge.taskv3.loop import _compact_transcript
+
+ messages = [
+ _assistant_turn("o1"),
+ _tool_msg("o1", "observe", "REAL_OBSERVE " + "p" * 300), # idx 1 (the only real snapshot)
+ _assistant_turn("c1", "o2"), # latest round: a click that failed, so the batched observe was skipped
+ _tool_msg("c1", "click", "tool_error: TimeoutError: click failed"), # idx 3
+ _tool_msg("o2", "observe", "skipped: earlier tool call in this batch failed"), # idx 4 (not tracked)
+ ]
+ _compact_transcript(messages, {1})
+ assert messages[1]["content"].startswith("REAL_OBSERVE") # real snapshot preserved as the live view
+ assert messages[4]["content"].startswith("skipped:") # skip stub left as-is, never elided or promoted
+
+
+def test_compact_transcript_noop_without_tracked_snapshots() -> None:
+ from skyvern.forge.taskv3.loop import _compact_transcript
+
+ messages = [_assistant_turn("a"), _tool_msg("a", "observe", "big " + "x" * 500)]
+ _compact_transcript(messages, set())
+ assert messages[1]["content"].startswith("big ") # nothing elided when nothing is tracked
+
+
+def _observe_tool(handler: ToolHandler) -> ToolSpec:
+ spec = ToolSpec(
+ name="observe", description="observe", parameters={"type": "object", "properties": {}}, handler=handler
+ )
+ spec.compactable = True
+ return spec
+
+
+def _big_observe_tool() -> ToolSpec:
+ async def handler(_args: dict[str, Any]) -> ToolResult:
+ return ToolResult.ok("OBSERVE " + "x" * 300) # a real, snapshot-sized perception result
+
+ return _observe_tool(handler)
+
+
+async def test_loop_compacts_superseded_observe_snapshots() -> None:
+ # Across a multi-observe run the loop keeps only the latest snapshot in the re-sent transcript,
+ # eliding earlier ones — this is what bounds context growth on perception-heavy pages.
+ script = [
+ [("observe", {})],
+ [("observe", {})],
+ [("observe", {})],
+ [("finish", {"status": "completed", "reason": "ok"})],
+ ]
+ outcome, _ = await _run(script, [_big_observe_tool(), make_finish_tool()])
+ assert outcome.status == "completed"
+ obs_msgs = [m for m in outcome.messages if m.get("role") == "tool" and m.get("name") == "observe"]
+ assert len(obs_msgs) == 3
+ elided = [m for m in obs_msgs if m["content"].startswith("[superseded ")]
+ intact = [m for m in obs_msgs if m["content"].startswith("OBSERVE ")]
+ assert len(elided) == 2 and len(intact) == 1 # only the most-recent observe snapshot survives
+
+
+async def test_loop_elides_superseded_short_snapshots() -> None:
+ # A genuine but tiny snapshot is still elided once superseded: snapshots are tracked by success
+ # status, not size, so perception-light pages compact too (the old length heuristic missed these).
+ async def handler(_args: dict[str, Any]) -> ToolResult:
+ return ToolResult.ok("OBS") # 3 chars — well under any size threshold, but a real snapshot
+
+ script = [[("observe", {})], [("observe", {})], [("finish", {"status": "completed", "reason": "ok"})]]
+ outcome, _ = await _run(script, [_observe_tool(handler), make_finish_tool()])
+ obs = [m for m in outcome.messages if m.get("role") == "tool" and m.get("name") == "observe"]
+ assert len(obs) == 2
+ assert obs[0]["content"].startswith("[superseded ") # older short snapshot elided
+ assert obs[1]["content"] == "OBS" # newest kept
+
+
+async def test_loop_verbose_error_never_shadows_real_snapshot() -> None:
+ # A verbose tool error (e.g. a multi-line Playwright timeout, well over any length threshold) must
+ # never be treated as the live snapshot: it has error status, so it is never tracked and the last
+ # good snapshot survives. This is the failure a size-based heuristic would have gotten wrong.
+ calls = {"n": 0}
+
+ async def handler(_args: dict[str, Any]) -> ToolResult:
+ calls["n"] += 1
+ if calls["n"] == 1:
+ return ToolResult.ok("OBSERVE " + "x" * 300) # real snapshot
+ return ToolResult.error("tool_error: TimeoutError: " + "waiting for selector\n" * 40) # long error
+
+ script = [[("observe", {})], [("observe", {})], [("finish", {"status": "completed", "reason": "ok"})]]
+ outcome, _ = await _run(script, [_observe_tool(handler), make_finish_tool()])
+ obs = [m for m in outcome.messages if m.get("role") == "tool" and m.get("name") == "observe"]
+ assert len(obs) == 2
+ assert obs[0]["content"].startswith("OBSERVE ") # last good snapshot preserved, not shadowed by the error
+ assert obs[1]["content"].startswith("tool_error:") # the long error left intact, never promoted or elided
+
+
+async def test_finish_completed_defers_until_page_settles() -> None:
+ # A finish(completed) on a still-rendering page (delayed data load) is deferred so the model
+ # re-verifies against the settled state; the deferral is an ordinary tool error, and the
+ # follow-up finish on the settled page is terminal.
+ probe_results = iter([False, True])
+
+ async def probe() -> bool:
+ return next(probe_results)
+
+ script = [
+ [("finish", {"status": "completed", "reason": "looks done"})],
+ [("finish", {"status": "completed", "reason": "confirmed on settled page"})],
+ ]
+ outcome, _ = await _run(script, [make_finish_tool(settle_probe=probe)])
+ assert outcome.status == "completed"
+ assert outcome.reason == "confirmed on settled page"
+ deferral_messages = [
+ m for m in outcome.messages if m.get("role") == "tool" and "still rendering" in str(m.get("content"))
+ ]
+ assert len(deferral_messages) == 1
+
+
+async def test_finish_settle_deferrals_are_bounded_and_scoped_to_completed() -> None:
+ # A permanently-unsettled probe cannot livelock the run: after the deferral cap the verdict is
+ # accepted. terminated/failed finishes never consult the probe.
+ async def never_settled() -> bool:
+ return False
+
+ script = [
+ [("finish", {"status": "completed", "reason": "try 1"})],
+ [("finish", {"status": "completed", "reason": "try 2"})],
+ [("finish", {"status": "completed", "reason": "try 3"})],
+ ]
+ outcome, _ = await _run(script, [make_finish_tool(settle_probe=never_settled, max_settle_deferrals=2)])
+ assert outcome.status == "completed"
+ assert outcome.reason == "try 3"
+
+ probe_calls = 0
+
+ async def counting_probe() -> bool:
+ nonlocal probe_calls
+ probe_calls += 1
+ return False
+
+ script = [[("finish", {"status": "terminated", "reason": "blocked"})]]
+ outcome, _ = await _run(script, [make_finish_tool(settle_probe=counting_probe)])
+ assert outcome.status == "terminated"
+ assert probe_calls == 0
+
+
+async def test_finish_settle_probe_error_counts_as_settled() -> None:
+ # A raising probe (e.g. execution context destroyed mid-navigation) must never block a
+ # legitimate completion: the verdict is accepted immediately.
+ async def exploding_probe() -> bool:
+ raise RuntimeError("execution context was destroyed")
+
+ script = [[("finish", {"status": "completed", "reason": "done"})]]
+ outcome, _ = await _run(script, [make_finish_tool(settle_probe=exploding_probe)])
+ assert outcome.status == "completed"
+ assert outcome.reason == "done"
+
+
+async def test_no_tool_call_turn_is_counted_and_nudged() -> None:
+ tools = [make_finish_tool()]
+ script = [[], [("finish", {"status": "completed", "reason": "ok"})]]
+ outcome, _ = await _run(script, tools)
+
+ assert outcome.status == "completed"
+ assert outcome.no_tool_call_turns == 1
+ nudges = [m for m in outcome.messages if m.get("role") == "user" and m.get("content") == NO_TOOL_CALL_NUDGE]
+ assert len(nudges) == 1
+
+
+class _ToolChoiceSensitiveCaller(_ScriptedCaller):
+ """Rejects any call carrying ``tool_choice``, as a provider that does not accept it would."""
+
+ def __init__(self, script: list[list[tuple[str, dict[str, Any]]]]) -> None:
+ super().__init__(script)
+ self.tool_choice_per_call: list[str | None] = []
+
+ async def call(self, **kwargs: Any) -> dict[str, Any]:
+ self.tool_choice_per_call.append(kwargs.get("tool_choice"))
+ if kwargs.get("tool_choice") is not None:
+ # The LLM layer maps a provider 400 onto the retryable type, so that -- not a bare
+ # exception -- is what the loop actually has to degrade from.
+ raise LLMProviderErrorRetryableTask("TEST_KEY")
+ return await super().call(**kwargs)
+
+
+async def test_loop_drops_tool_choice_and_retries_the_turn_after_a_call_failure() -> None:
+ caller = _ToolChoiceSensitiveCaller([[("finish", {"status": "completed", "reason": "ok"})]])
+ outcome = await run_agent_tool_loop(
+ llm_caller=caller,
+ system_prompt="sys",
+ user_prompt="goal",
+ tools=[make_finish_tool()],
+ max_turns=5,
+ max_tool_calls=10,
+ call_kwargs={"tool_choice": "required"},
+ retryable_call_exceptions=(LLMProviderErrorRetryableTask,),
+ max_call_retries=2,
+ call_retry_base_delay=0.0,
+ )
+
+ assert outcome.status == "completed"
+ assert outcome.tool_choice_in_effect is False
+ # The transient budget is spent first, then the parameter is dropped and the turn re-issued.
+ assert caller.tool_choice_per_call == ["required", "required", "required", None]
+
+
+async def test_loop_does_not_blame_tool_choice_for_a_context_window_overflow() -> None:
+ # Dropping a parameter cannot shrink a transcript, so re-issuing would burn a second oversized
+ # request and mislabel the failure.
+ class _OverflowingCaller(_ScriptedCaller):
+ async def call(self, **kwargs: Any) -> dict[str, Any]:
+ self.calls += 1
+ raise SkyvernContextWindowExceededError(model="test-model")
+
+ caller = _OverflowingCaller([])
+ outcome = await run_agent_tool_loop(
+ llm_caller=caller,
+ system_prompt="sys",
+ user_prompt="goal",
+ tools=[make_finish_tool()],
+ max_turns=5,
+ max_tool_calls=10,
+ call_kwargs={"tool_choice": "required"},
+ )
+
+ assert outcome.status == "loop_error"
+ assert caller.calls == 1
diff --git a/tests/unit/test_taskv3_tools.py b/tests/unit/test_taskv3_tools.py
index 26bee3ed7..8da198046 100644
--- a/tests/unit/test_taskv3_tools.py
+++ b/tests/unit/test_taskv3_tools.py
@@ -10,11 +10,11 @@ import contextlib
import json
from collections.abc import AsyncIterator
from pathlib import Path
-from typing import Any
+from typing import Any, Awaitable, Callable
import pytest
-from skyvern.forge.taskv3.tools import build_browser_tools
+from skyvern.forge.taskv3.tools import PAGE_UNAVAILABLE_ERROR, build_browser_tools
def _has_playwright_browser() -> bool:
@@ -53,6 +53,13 @@ class _FakePage:
self.calls: list[tuple[str, dict[str, Any]]] = []
self.element = _FakeElement()
+ async def eval_on_selector(self, selector: str, js: str) -> str:
+ # Field-type probe: report a non-typeahead type so legacy tests exercise the plain fill path.
+ return "password"
+
+ async def hover(self, selector: str, timeout: int | None = None) -> None:
+ self.calls.append(("hover", {"selector": selector}))
+
async def evaluate(self, _js: str) -> str:
return json.dumps(
{
@@ -142,13 +149,22 @@ class _FakePage:
return _FakePage._Mouse(self)
+def _fixed_page_provider(page: Any) -> Callable[[], Awaitable[Any]]:
+ """A provider that always resolves to the same `page` object (today's bound-once shape)."""
+
+ async def _provider() -> Any:
+ return page
+
+ return _provider
+
+
def _tool(tools, name):
return next(t for t in tools if t.name == name)
@pytest.mark.asyncio
async def test_tool_set_and_no_task_ecosystem_tools() -> None:
- tools = build_browser_tools(_FakePage())
+ tools = build_browser_tools(_fixed_page_provider(_FakePage()))
names = {t.name for t in tools}
assert {
"observe",
@@ -168,7 +184,7 @@ async def test_tool_set_and_no_task_ecosystem_tools() -> None:
@pytest.mark.asyncio
async def test_observe_renders_selectors_labels_options() -> None:
- tools = build_browser_tools(_FakePage())
+ tools = build_browser_tools(_fixed_page_provider(_FakePage()))
r = await _tool(tools, "observe").handler({})
assert r.status == "ok"
assert "#first" in r.content and "First name" in r.content
@@ -179,7 +195,7 @@ async def test_observe_renders_selectors_labels_options() -> None:
@pytest.mark.asyncio
async def test_observe_renders_checkbox_checked_state() -> None:
# observe must surface checked-state so a required consent box can be re-verified.
- tools = build_browser_tools(_FakePage())
+ tools = build_browser_tools(_fixed_page_provider(_FakePage()))
r = await _tool(tools, "observe").handler({})
assert "#agree" in r.content and "checked=" in r.content
@@ -188,7 +204,7 @@ async def test_observe_renders_checkbox_checked_state() -> None:
async def test_observe_renders_group_context() -> None:
# Controls whose meaning lives in surrounding text (radio/checkbox groups, weak labels) carry a
# `group` field with the question text, so the agent can answer without fetching raw HTML.
- tools = build_browser_tools(_FakePage())
+ tools = build_browser_tools(_fixed_page_provider(_FakePage()))
r = await _tool(tools, "observe").handler({})
assert "group=" in r.content
assert "Consent: I agree to the terms" in r.content
@@ -200,13 +216,13 @@ async def test_click_type_select_dispatch_raw_ops(monkeypatch: pytest.MonkeyPatc
monkeypatch.setattr(_a, "sleep", _instant_sleep) # the typeahead probe polls; skip real waiting in tests
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
await _tool(tools, "click").handler({"selector": "#submit"})
await _tool(tools, "type").handler({"selector": "#first", "text": "John"})
await _tool(tools, "select_option").handler({"selector": "#country", "label": "United States"})
assert ("click", {"selector": "#submit"}) in page.calls
# `type` keystroke-types the value (typeahead-safe path) — the value is entered via page.type
- assert ("type", {"selector": "#first", "text": "John"}) in page.calls
+ assert ("fill", {"selector": "#first", "text": "John"}) in page.calls
assert ("select_option", {"selector": "#country", "value": None, "label": "United States"}) in page.calls
@@ -216,7 +232,7 @@ async def test_navigate_and_wait(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(urlv, "validate_fetch_url", lambda url: url) # no DNS in unit tests
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
r = await _tool(tools, "navigate").handler({"url": "https://jobs.example.test/acme/123"})
assert r.status == "ok" and page.url.endswith("/acme/123")
r2 = await _tool(tools, "wait").handler({"selector": "#next", "state": "visible"})
@@ -234,7 +250,7 @@ async def test_navigate_validates_url_before_goto(monkeypatch: pytest.MonkeyPatc
monkeypatch.setattr(urlv, "validate_fetch_url", _reject)
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
with pytest.raises(ValueError):
await _tool(tools, "navigate").handler({"url": "http://169.254.169.254/latest/meta-data/"})
assert not any(c[0] == "goto" for c in page.calls) # never navigated
@@ -248,13 +264,55 @@ async def test_handler_error_is_captured_not_raised() -> None:
raise RuntimeError("detached")
page.click = boom # type: ignore[assignment]
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
# ToolSpec handlers may raise; the loop converts to an error result. Here we assert the
# handler itself raises so the loop's try/except path is what catches it (parity with loop.py).
with pytest.raises(RuntimeError):
await _tool(tools, "click").handler({"selector": "#x"})
+async def test_tool_resolves_page_at_call_time_not_bound_once() -> None:
+ # The core fix: a call must resolve the CURRENT page from the provider, not a page captured
+ # once when the tools were built — so a click landing on a new tab/popup is followed.
+ page_a, page_b = _FakePage(), _FakePage()
+ current: dict[str, Any] = {"page": page_a}
+
+ async def provider() -> Any:
+ return current["page"]
+
+ tools = build_browser_tools(provider)
+ await _tool(tools, "click").handler({"selector": "#first"})
+ current["page"] = page_b
+ await _tool(tools, "click").handler({"selector": "#second"})
+
+ assert any(c[0] == "click" and c[1]["selector"] == "#first" for c in page_a.calls)
+ assert not any(c[1].get("selector") == "#second" for c in page_a.calls)
+ assert any(c[0] == "click" and c[1]["selector"] == "#second" for c in page_b.calls)
+
+
+ "tool_name,args",
+ [
+ ("observe", {}),
+ ("get_html", {}),
+ ("click", {"selector": "#x"}),
+ ("type", {"selector": "#x", "text": "y"}),
+ ("wait", {"time_ms": 10}),
+ ("navigate", {"url": "https://example.test/x"}),
+ ],
+)
+async def test_tool_reports_page_unavailable_when_provider_returns_none(tool_name: str, args: dict[str, Any]) -> None:
+ async def gone_provider() -> Any:
+ return None
+
+ tools = build_browser_tools(gone_provider)
+ r = await _tool(tools, tool_name).handler(args)
+ assert r.status == "error"
+ assert r.content == PAGE_UNAVAILABLE_ERROR
+
+
def test_build_action_maps_each_tool_to_action_model() -> None:
from skyvern.forge.taskv3.preflight import _build_action
from skyvern.webeye.actions.actions import (
@@ -296,7 +354,7 @@ async def test_wrapped_tool_skips_preflight_when_policy_disabled(monkeypatch: py
monkeypatch.setattr("skyvern.forge.taskv3.preflight.preflight_action", lambda *a, **k: calls.append(a))
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
await _tool(tools, "click").handler({"selector": "#submit"})
# No policy call when disabled, but the underlying browser op still runs.
@@ -314,7 +372,7 @@ async def test_wrapped_tool_runs_preflight_when_observation_enabled(monkeypatch:
)
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
await _tool(tools, "click").handler({"selector": "#submit"})
assert len(seen) == 1
@@ -328,7 +386,7 @@ async def test_wrapped_tool_runs_preflight_when_observation_enabled(monkeypatch:
@pytest.mark.asyncio
async def test_wait_caps_selector_timeout() -> None:
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
wait = _tool(tools, "wait")
await wait.handler({"selector": "#ready", "timeout_ms": 999999})
@@ -348,6 +406,7 @@ def test_preflight_tool_set_matches_builder() -> None:
assert PREFLIGHT_TOOL_NAMES == {
"click",
+ "hover",
"type",
"select_combobox",
"select_option",
@@ -357,6 +416,7 @@ def test_preflight_tool_set_matches_builder() -> None:
}
rep = {
"click": {"selector": "#x"},
+ "hover": {"selector": "#x"},
"type": {"selector": "#x", "text": "y"},
"select_combobox": {"selector": "#x", "value": "v"},
"select_option": {"selector": "#x", "value": "v"},
@@ -383,7 +443,7 @@ async def test_navigate_runs_preflight_when_observation_enabled(monkeypatch: pyt
lambda action, page, *, site: seen.append((action, site)),
)
page = _FakePage()
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
await _tool(tools, "navigate").handler({"url": "https://jobs.example.test/acme/1"})
assert len(seen) == 1
@@ -392,6 +452,69 @@ async def test_navigate_runs_preflight_when_observation_enabled(monkeypatch: pyt
assert action.url == "https://jobs.example.test/acme/1" # PAGE target the origin check can act on
+async def test_type_resolves_secret_placeholder_at_fill_time() -> None:
+ # Workflow credentials reach the model only as placeholders; the real value must be what
+ # lands in the page, while the tool result echoes neither.
+ page = _FakePage()
+ tools = build_browser_tools(
+ _fixed_page_provider(page),
+ resolve_typed_text=lambda text: "real-secret" if text == "placeholder_abc" else text,
+ )
+ result = await _tool(tools, "type").handler({"selector": "#password", "text": "placeholder_abc"})
+ kinds = {c[0]: c[1] for c in page.calls}
+ assert kinds["fill"] == {"selector": "#password", "text": "real-secret"}
+ assert "real-secret" not in result.content
+ assert "placeholder_abc" not in result.content
+
+
+async def test_type_resolver_failure_or_non_string_falls_back_to_literal() -> None:
+ page = _FakePage()
+
+ def _raises(_text: str) -> str:
+ raise RuntimeError("resolver blew up")
+
+ tools = build_browser_tools(_fixed_page_provider(page), resolve_typed_text=_raises)
+ await _tool(tools, "type").handler({"selector": "#a", "text": "literal-1"})
+ tools = build_browser_tools(_fixed_page_provider(page), resolve_typed_text=lambda _t: None)
+ await _tool(tools, "type").handler({"selector": "#b", "text": "literal-2"})
+ filled = [c[1] for c in page.calls if c[0] == "fill"]
+ assert filled == [
+ {"selector": "#a", "text": "literal-1"},
+ {"selector": "#b", "text": "literal-2"},
+ ]
+
+
+async def test_file_upload_resolves_secret_placeholder_and_does_not_echo() -> None:
+ # A secret-bound file value reaches the model as a placeholder; the upload must resolve it
+ # the same way type does (the step engine resolves UploadFileAction.file_url), and neither
+ # the placeholder nor the resolved source may echo in the tool result.
+ page = _FakePage()
+ captured: dict[str, str] = {}
+
+ async def fake_download_file(source: str, output_dir: str | None = None, organization_id: str | None = None) -> str:
+ captured["source"] = source
+ return "/tmp/downloaded-file.pdf"
+
+ tools = build_browser_tools(
+ _fixed_page_provider(page),
+ resolve_typed_text=lambda text: "https://files.internal/real.pdf" if text == "placeholder_file" else text,
+ )
+ import skyvern.forge.sdk.api.files as files_module
+
+ original = files_module.download_file
+ files_module.download_file = fake_download_file # type: ignore[assignment]
+ try:
+ result = await _tool(tools, "file_upload").handler({"selector": "#upload", "file": "placeholder_file"})
+ finally:
+ files_module.download_file = original
+ assert captured["source"] == "https://files.internal/real.pdf"
+ assert "placeholder_file" not in result.content
+ assert "real.pdf" not in result.content
+
+
class _TypeaheadFakePage:
"""Fake page for the BEHAVIORAL typeahead path. `evaluate` stands in for the JS suggestion-finder
(_FIND_SUGGESTION_JS, identified by the data-tv3-sugg tag it sets) and the commit-verifier
@@ -452,7 +575,7 @@ async def test_type_auto_commits_reacting_typeahead(monkeypatch: pytest.MonkeyPa
suggestion={"text": "San Francisco, CA, USA", "score": 2},
committed="San Francisco, CA, USA",
)
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
r = await _tool(tools, "type").handler({"selector": "#location-input", "text": "San Francisco, California"})
assert r.status == "ok"
assert "San Francisco, CA, USA" in r.content # the value the widget committed (normalized), not raw text
@@ -467,7 +590,7 @@ async def test_type_leaves_raw_text_when_no_suggestion_reacts(monkeypatch: pytes
monkeypatch.setattr(_a, "sleep", _instant_sleep)
page = _TypeaheadFakePage(field_type="text", suggestion=None)
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
r = await _tool(tools, "type").handler({"selector": "#notes", "text": "Springfield"})
assert r.status == "ok"
assert ("type", ("#notes", "Springfield")) in page.calls # keystroke-typed; raw text left in place
@@ -479,7 +602,7 @@ async def test_type_non_text_input_skips_probe_fast_path() -> None:
# A non-text input (email/tel/…) is never a typeahead: fast fill, no suggestion probe, no click —
# even if a suggestion would have been offered.
page = _TypeaheadFakePage(field_type="email", suggestion={"text": "[email protected]", "score": 9})
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
r = await _tool(tools, "type").handler({"selector": "#email", "text": "[email protected]"})
assert r.status == "ok"
assert ("fill", ("#email", "[email protected]")) in page.calls
@@ -494,7 +617,7 @@ async def test_select_combobox_commits_reacting_suggestion(monkeypatch: pytest.M
page = _TypeaheadFakePage(
field_type="text", suggestion={"text": "San Francisco, CA, USA", "score": 2}, committed="San Francisco, CA, USA"
)
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
r = await _tool(tools, "select_combobox").handler({"selector": "#loc", "value": "San Francisco, California"})
assert r.status == "ok" and "San Francisco, CA, USA" in r.content
assert page.clicked_suggestion
@@ -507,7 +630,7 @@ async def test_select_combobox_fails_loud_when_no_suggestion_reacts(monkeypatch:
monkeypatch.setattr(_a, "sleep", _instant_sleep)
page = _TypeaheadFakePage(field_type="text", suggestion=None)
- tools = build_browser_tools(page)
+ tools = build_browser_tools(_fixed_page_provider(page))
r = await _tool(tools, "select_combobox").handler({"selector": "#loc", "value": "San Francisco, California"})
assert r.status == "error" and "NOT filled" in r.content
@@ -672,3 +795,45 @@ async def test_autocomplete_flag_requires_real_combobox_semantics() -> None:
assert await page.eval_on_selector("#haspopup", _IS_AUTOCOMPLETE_JS) is True
finally:
await browser.close()
+
+
+async def test_hover_tool_dispatches_and_is_billable() -> None:
+ # ActionBlocks can carry hover goals; without a hover tool a v3 action block would churn its
+ # budget trying to hover with clicks.
+ page = _FakePage()
+ tools = build_browser_tools(_fixed_page_provider(page))
+ spec = _tool(tools, "hover")
+ result = await spec.handler({"selector": "#menu"})
+ assert result.status == "ok"
+ assert ("hover", {"selector": "#menu"}) in page.calls
+ assert spec.billable is True
+
+
+def test_perception_tools_are_compactable_and_actions_are_not() -> None:
+ # Compaction only elides tools flagged `compactable` on the real factory output. If a rename or a
+ # refactor of the flag loop in tools.py stops flagging observe/get_html, the transcript stops being
+ # bounded and the token-runaway returns — this asserts the production wiring, not a hand-built spec.
+ tools = build_browser_tools(_fixed_page_provider(_FakePage()))
+ assert _tool(tools, "observe").compactable is True
+ assert _tool(tools, "get_html").compactable is True
+ assert _tool(tools, "click").compactable is False # a page action is never elided
+
+
+async def test_preflighted_tool_resolves_page_once_per_call() -> None:
+ # The preflight wrapper hands its resolved page to the handler; a preflighted call must not
+ # resolve twice (each resolution is a must_get_working_page with its recovery path).
+ page = _FakePage()
+ calls = 0
+
+ async def counting_provider() -> Any:
+ nonlocal calls
+ calls += 1
+ return page
+
+ tools = build_browser_tools(counting_provider)
+ await _tool(tools, "click").handler({"selector": "#a"})
+ assert calls == 1
+ await _tool(tools, "click").handler({"selector": "#b"})
+ assert calls == 2
diff --git a/tests/unit/test_validation_without_page_information.py b/tests/unit/test_validation_without_page_information.py
index 4d73a9372..f89ce8aee 100644
--- a/tests/unit/test_validation_without_page_information.py
+++ b/tests/unit/test_validation_without_page_information.py
@@ -17,6 +17,7 @@ from skyvern.forge.sdk.core.skyvern_context import SkyvernContext
from skyvern.forge.sdk.workflow.models.block import BaseTaskBlock, ValidationBlock
from skyvern.forge.sdk.workflow.models.parameter import OutputParameter, ParameterType
from skyvern.forge.sdk.workflow.workflow_definition_converter import block_yaml_to_block
+from skyvern.schemas.runs import RunEngine
from skyvern.schemas.workflows import ValidationBlockYAML
@@ -66,6 +67,28 @@ def test_converter_defaults_flag_false_when_omitted() -> None:
assert block.without_page_information is False
+def test_converter_threads_engine_and_max_steps_per_run_from_yaml() -> None:
+ block_yaml = ValidationBlockYAML(
+ label="v",
+ complete_criterion="x",
+ engine=RunEngine.skyvern_v3,
+ max_steps_per_run=7,
+ )
+ block = block_yaml_to_block(block_yaml, {"v_output": _output_parameter("v")})
+ assert isinstance(block, ValidationBlock)
+ assert block.engine == RunEngine.skyvern_v3
+ assert block.max_steps_per_run == 7
+
+
+def test_converter_defaults_engine_and_max_steps_per_run_when_omitted() -> None:
+ """Omitting the new fields must reproduce today's behavior: the default engine, and the
+ historical hardcoded step cap of 2 (not the YAML field's own None default)."""
+ block_yaml = ValidationBlockYAML(label="v", complete_criterion="x")
+ block = block_yaml_to_block(block_yaml, {"v_output": _output_parameter("v")})
+ assert block.engine == RunEngine.skyvern_v1
+ assert block.max_steps_per_run == 2
+
+
@pytest.mark.asyncio
async def test_execute_sets_and_restores_context_flag(monkeypatch: pytest.MonkeyPatch) -> None:
"""execute() must expose the block's flag on the context for the duration of
diff --git a/tests/smoke_tests/test_while_loop_pagination.py b/tests/unit/test_while_loop_pagination.py
similarity index 100%
rename from tests/smoke_tests/test_while_loop_pagination.py
rename to tests/unit/test_while_loop_pagination.py
diff --git a/tests/unit/test_workflow_run_step_budget.py b/tests/unit/test_workflow_run_step_budget.py
index 6fff9384a..b9f26c7dc 100644
--- a/tests/unit/test_workflow_run_step_budget.py
+++ b/tests/unit/test_workflow_run_step_budget.py
@@ -32,13 +32,13 @@ async def test_returns_none_when_task_has_no_workflow_run_id() -> None:
with patch("skyvern.forge.agent.app") as mock_app:
mock_app.DATABASE.tasks.get_tasks_by_workflow_run_id = AsyncMock()
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids = AsyncMock()
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids = AsyncMock()
result = await agent._check_workflow_run_step_budget(org, task)
assert result is None
mock_app.DATABASE.tasks.get_tasks_by_workflow_run_id.assert_not_called()
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids.assert_not_called()
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids.assert_not_called()
@pytest.mark.asyncio
@@ -49,7 +49,7 @@ async def test_returns_none_when_org_has_no_cap() -> None:
with patch("skyvern.forge.agent.app") as mock_app:
mock_app.DATABASE.tasks.get_tasks_by_workflow_run_id = AsyncMock()
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids = AsyncMock()
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids = AsyncMock()
result = await agent._check_workflow_run_step_budget(org, task)
@@ -65,13 +65,13 @@ async def test_returns_zero_count_when_workflow_run_has_no_tasks() -> None:
with patch("skyvern.forge.agent.app") as mock_app:
mock_app.DATABASE.tasks.get_tasks_by_workflow_run_id = AsyncMock(return_value=[])
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids = AsyncMock()
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids = AsyncMock()
result = await agent._check_workflow_run_step_budget(org, task)
assert result == (0, 20)
# Skip the count query when there are no task ids to filter on.
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids.assert_not_called()
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids.assert_not_called()
@pytest.mark.asyncio
@@ -86,12 +86,12 @@ async def test_returns_count_and_cap_when_tasks_present() -> None:
with patch("skyvern.forge.agent.app") as mock_app:
mock_app.DATABASE.tasks.get_tasks_by_workflow_run_id = AsyncMock(return_value=sibling_tasks)
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids = AsyncMock(return_value=18)
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids = AsyncMock(return_value=18)
result = await agent._check_workflow_run_step_budget(org, task)
assert result == (18, 20)
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids.assert_awaited_once_with(
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids.assert_awaited_once_with(
task_ids=["task-1", "task-2"],
organization_id="org-1",
)
@@ -99,14 +99,14 @@ async def test_returns_count_and_cap_when_tasks_present() -> None:
@pytest.mark.asyncio
async def test_treats_none_count_as_zero() -> None:
- # ``get_total_unique_step_order_count_by_task_ids`` can return None for a no-row count.
+ # ``get_total_unique_progress_round_count_by_task_ids`` can return None for a no-row count.
agent = ForgeAgent()
org = _make_organization(max_steps_per_workflow_run=20)
task = _make_task(workflow_run_id="wr-1")
with patch("skyvern.forge.agent.app") as mock_app:
mock_app.DATABASE.tasks.get_tasks_by_workflow_run_id = AsyncMock(return_value=[MagicMock(task_id="task-1")])
- mock_app.DATABASE.tasks.get_total_unique_step_order_count_by_task_ids = AsyncMock(return_value=None)
+ mock_app.DATABASE.tasks.get_total_unique_progress_round_count_by_task_ids = AsyncMock(return_value=None)
result = await agent._check_workflow_run_step_budget(org, task)
diff --git a/tests/unit/workflow/test_validation_action_yaml_field_passthrough.py b/tests/unit/workflow/test_validation_action_yaml_field_passthrough.py
new file mode 100644
index 000000000..60dd2b6cc
--- /dev/null
+++ b/tests/unit/workflow/test_validation_action_yaml_field_passthrough.py
@@ -0,0 +1,88 @@
+"""Regression coverage for the workflow yaml-import path silently dropping `engine` and
+`max_steps_per_run` on validation/action blocks: WorkflowCreateYAMLRequest.model_validate
+lacked the fields entirely, so a customer's yaml keys never reached the domain block.
+
+Drives the real path end to end: a raw dict (as a customer's yaml/json body would look) through
+WorkflowCreateYAMLRequest.model_validate, then through convert_workflow_definition, asserting on
+the resulting domain blocks rather than the intermediate yaml model.
+"""
+
+from __future__ import annotations
+
+from skyvern.forge.sdk.workflow.models.block import ActionBlock, Block, ValidationBlock
+from skyvern.forge.sdk.workflow.workflow_definition_converter import convert_workflow_definition
+from skyvern.schemas.runs import RunEngine
+from skyvern.schemas.workflows import WorkflowCreateYAMLRequest
+
+
+def _blocks_by_label(*, validation_block: dict[str, object], action_block: dict[str, object]) -> dict[str, Block]:
+ request = WorkflowCreateYAMLRequest.model_validate(
+ {
+ "title": "t",
+ "workflow_definition": {
+ "parameters": [],
+ "blocks": [validation_block, action_block],
+ },
+ }
+ )
+ converted = convert_workflow_definition(
+ workflow_definition_yaml=request.workflow_definition,
+ workflow_id="wid_test",
+ )
+ return {block.label: block for block in converted.blocks}
+
+
+def test_yaml_import_threads_engine_and_max_steps_per_run() -> None:
+ """SILENT-DROP REGRESSION. Values are chosen distinct from every legacy hardcoded default
+ (engine skyvern-1.0, max_steps_per_run 2/1) so this only passes if the yaml keys genuinely
+ reach the domain blocks, not by coincidence."""
+ blocks = _blocks_by_label(
+ validation_block={
+ "block_type": "validation",
+ "label": "v",
+ "complete_criterion": "billing date within range",
+ "engine": "skyvern-3.0",
+ "max_steps_per_run": 6,
+ },
+ action_block={
+ "block_type": "action",
+ "label": "a",
+ "navigation_goal": "click submit",
+ "max_steps_per_run": 4,
+ },
+ )
+
+ validation_block = blocks["v"]
+ assert isinstance(validation_block, ValidationBlock)
+ assert validation_block.engine == RunEngine.skyvern_v3
+ assert validation_block.max_steps_per_run == 6
+
+ action_block = blocks["a"]
+ assert isinstance(action_block, ActionBlock)
+ assert action_block.max_steps_per_run == 4
+
+
+def test_yaml_import_defaults_when_new_keys_omitted() -> None:
+ """ZERO-BEHAVIOR-CHANGE. Today's defaults come from the converter's historical hardcoded
+ fallback (2 for validation, 1 for action), not from the yaml field's own None default."""
+ blocks = _blocks_by_label(
+ validation_block={
+ "block_type": "validation",
+ "label": "v",
+ "complete_criterion": "billing date within range",
+ },
+ action_block={
+ "block_type": "action",
+ "label": "a",
+ "navigation_goal": "click submit",
+ },
+ )
+
+ validation_block = blocks["v"]
+ assert isinstance(validation_block, ValidationBlock)
+ assert validation_block.engine == RunEngine.skyvern_v1
+ assert validation_block.max_steps_per_run == 2
+
+ action_block = blocks["a"]
+ assert isinstance(action_block, ActionBlock)
+ assert action_block.max_steps_per_run == 1
diff --git a/uv.lock b/uv.lock
index 96125f895..cdd6c9896 100644
--- a/uv.lock
+++ b/uv.lock
@@ -6716,7 +6716,7 @@ wheels = [
[[package]]
name = "skyvern"
-version = "1.0.48"
+version = "1.0.50"
source = { editable = "." }
dependencies = [
{ name = "cachetools" },