playwright-json-runner
Version:
Extends Playwright to run tests using JSON-based test definitions.
1,116 lines (1,113 loc) • 219 kB
TypeScript
import { z } from 'zod';
declare const selectorLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"selector">;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
by: "selector";
nth?: number | undefined;
}, {
value: string;
by: "selector";
nth?: number | undefined;
}>;
declare const xpathLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"xpath">;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
by: "xpath";
nth?: number | undefined;
}, {
value: string;
by: "xpath";
nth?: number | undefined;
}>;
declare const roleLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"role">;
role: z.ZodEnum<["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "meter", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]>;
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
exact: z.ZodOptional<z.ZodBoolean>;
checked: z.ZodOptional<z.ZodBoolean>;
disabled: z.ZodOptional<z.ZodBoolean>;
expanded: z.ZodOptional<z.ZodBoolean>;
includeHidden: z.ZodOptional<z.ZodBoolean>;
level: z.ZodOptional<z.ZodNumber>;
pressed: z.ZodOptional<z.ZodBoolean>;
selected: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
by: "role";
role: "code" | "status" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
exact?: boolean | undefined;
checked?: boolean | undefined;
disabled?: boolean | undefined;
expanded?: boolean | undefined;
includeHidden?: boolean | undefined;
level?: number | undefined;
name?: string | RegExp | undefined;
pressed?: boolean | undefined;
selected?: boolean | undefined;
nth?: number | undefined;
}, {
by: "role";
role: "code" | "status" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
exact?: boolean | undefined;
checked?: boolean | undefined;
disabled?: boolean | undefined;
expanded?: boolean | undefined;
includeHidden?: boolean | undefined;
level?: number | undefined;
name?: string | RegExp | undefined;
pressed?: boolean | undefined;
selected?: boolean | undefined;
nth?: number | undefined;
}>;
declare const textLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"text">;
value: z.ZodString;
exact: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
by: "text";
exact?: boolean | undefined;
nth?: number | undefined;
}, {
value: string;
by: "text";
exact?: boolean | undefined;
nth?: number | undefined;
}>;
declare const labelLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"label">;
value: z.ZodString;
exact: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
by: "label";
exact?: boolean | undefined;
nth?: number | undefined;
}, {
value: string;
by: "label";
exact?: boolean | undefined;
nth?: number | undefined;
}>;
declare const placeholderLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"placeholder">;
value: z.ZodString;
exact: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
by: "placeholder";
exact?: boolean | undefined;
nth?: number | undefined;
}, {
value: string;
by: "placeholder";
exact?: boolean | undefined;
nth?: number | undefined;
}>;
declare const altTextLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"altText">;
value: z.ZodString;
exact: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
by: "altText";
exact?: boolean | undefined;
nth?: number | undefined;
}, {
value: string;
by: "altText";
exact?: boolean | undefined;
nth?: number | undefined;
}>;
declare const titleLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"title">;
value: z.ZodString;
exact: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
by: "title";
exact?: boolean | undefined;
nth?: number | undefined;
}, {
value: string;
by: "title";
exact?: boolean | undefined;
nth?: number | undefined;
}>;
declare const testIdLocatorSchema: z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"testId">;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
by: "testId";
nth?: number | undefined;
}, {
value: string;
by: "testId";
nth?: number | undefined;
}>;
type LocatorParams = z.infer<typeof selectorLocatorSchema> | z.infer<typeof xpathLocatorSchema> | z.infer<typeof roleLocatorSchema> | z.infer<typeof textLocatorSchema> | z.infer<typeof labelLocatorSchema> | z.infer<typeof placeholderLocatorSchema> | z.infer<typeof altTextLocatorSchema> | z.infer<typeof titleLocatorSchema> | z.infer<typeof testIdLocatorSchema> | {
by: "nested";
parent: LocatorParams;
child: LocatorParams;
nth?: number;
} | {
by: string;
value?: string;
nth?: number;
};
declare let locatorParamsSchema: z.ZodType<LocatorParams>;
declare const nestedLocatorSchema: z.ZodLazy<z.ZodObject<{
nth: z.ZodOptional<z.ZodNumber>;
by: z.ZodLiteral<"nested">;
parent: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
child: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}, "strip", z.ZodTypeAny, {
by: "nested";
parent: LocatorParams;
child: LocatorParams;
nth?: number | undefined;
}, {
by: "nested";
parent: LocatorParams;
child: LocatorParams;
nth?: number | undefined;
}>>;
type NestedLocatorParams = z.infer<typeof nestedLocatorSchema>;
declare const testRunSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
browser: z.ZodEnum<["chrome", "firefox", "webkit"]>;
host: z.ZodString;
scenarios: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
name: z.ZodString;
steps: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
description: z.ZodString;
actions: z.ZodArray<z.ZodUnion<[z.ZodDiscriminatedUnion<"action", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"navigate">;
url: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
waitUntil: z.ZodOptional<z.ZodEnum<["commit", "domcontentloaded", "load", "networkidle"]>>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "navigate";
url: string;
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}, {
action: "navigate";
url: string;
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"sleep">;
duration: z.ZodNumber;
}>, "strip", z.ZodTypeAny, {
action: "sleep";
duration: number;
label?: string | undefined;
description?: string | undefined;
}, {
action: "sleep";
duration: number;
label?: string | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"goBack">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
waitUntil: z.ZodOptional<z.ZodEnum<["commit", "domcontentloaded", "load", "networkidle"]>>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "goBack";
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}, {
action: "goBack";
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"goForward">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
waitUntil: z.ZodOptional<z.ZodEnum<["commit", "domcontentloaded", "load", "networkidle"]>>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "goForward";
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}, {
action: "goForward";
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"scroll">;
deltaX: z.ZodNumber;
deltaY: z.ZodNumber;
}>, "strip", z.ZodTypeAny, {
action: "scroll";
deltaX: number;
deltaY: number;
label?: string | undefined;
description?: string | undefined;
}, {
action: "scroll";
deltaX: number;
deltaY: number;
label?: string | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"waitForURL">;
url: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
waitUntil: z.ZodOptional<z.ZodEnum<["commit", "domcontentloaded", "load", "networkidle"]>>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}, {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "waitForURL";
url: string;
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}, {
action: "waitForURL";
url: string;
label?: string | undefined;
options?: {
timeout?: number | undefined;
waitUntil?: "commit" | "domcontentloaded" | "load" | "networkidle" | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"waitForLoadState">;
state: z.ZodOptional<z.ZodEnum<["domcontentloaded", "load", "networkidle"]>>;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
}, {
timeout?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "waitForLoadState";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
state?: "domcontentloaded" | "load" | "networkidle" | undefined;
}, {
action: "waitForLoadState";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
state?: "domcontentloaded" | "load" | "networkidle" | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"waitForText">;
value: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
state: z.ZodOptional<z.ZodEnum<["attached", "detached", "visible", "hidden"]>>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
state?: "attached" | "detached" | "visible" | "hidden" | undefined;
}, {
timeout?: number | undefined;
state?: "attached" | "detached" | "visible" | "hidden" | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
value: string;
action: "waitForText";
label?: string | undefined;
options?: {
timeout?: number | undefined;
state?: "attached" | "detached" | "visible" | "hidden" | undefined;
} | undefined;
description?: string | undefined;
}, {
value: string;
action: "waitForText";
label?: string | undefined;
options?: {
timeout?: number | undefined;
state?: "attached" | "detached" | "visible" | "hidden" | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"clickCoordinates">;
x: z.ZodNumber;
y: z.ZodNumber;
options: z.ZodOptional<z.ZodObject<{
button: z.ZodOptional<z.ZodEnum<["left", "middle", "right"]>>;
clickCount: z.ZodOptional<z.ZodNumber>;
delay: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
button?: "left" | "middle" | "right" | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
}, {
button?: "left" | "middle" | "right" | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "clickCoordinates";
x: number;
y: number;
label?: string | undefined;
options?: {
button?: "left" | "middle" | "right" | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
action: "clickCoordinates";
x: number;
y: number;
label?: string | undefined;
options?: {
button?: "left" | "middle" | "right" | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"assertURL">;
value: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
}, {
timeout?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
value: string;
action: "assertURL";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
value: string;
action: "assertURL";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"assertTitle">;
value: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
}, {
timeout?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
value: string;
action: "assertTitle";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
value: string;
action: "assertTitle";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"screenshot">;
locator: z.ZodOptional<z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>>;
path: z.ZodOptional<z.ZodString>;
options: z.ZodOptional<z.ZodObject<{
fullPage: z.ZodOptional<z.ZodBoolean>;
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
fullPage?: boolean | undefined;
}, {
timeout?: number | undefined;
fullPage?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "screenshot";
label?: string | undefined;
path?: string | undefined;
options?: {
timeout?: number | undefined;
fullPage?: boolean | undefined;
} | undefined;
description?: string | undefined;
locator?: LocatorParams | undefined;
}, {
action: "screenshot";
label?: string | undefined;
path?: string | undefined;
options?: {
timeout?: number | undefined;
fullPage?: boolean | undefined;
} | undefined;
description?: string | undefined;
locator?: LocatorParams | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
action: z.ZodLiteral<"assertSnapshot">;
locator: z.ZodOptional<z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>>;
name: z.ZodOptional<z.ZodString>;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
maxDiffPixels: z.ZodOptional<z.ZodNumber>;
maxDiffPixelRatio: z.ZodOptional<z.ZodNumber>;
threshold: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
maxDiffPixels?: number | undefined;
maxDiffPixelRatio?: number | undefined;
threshold?: number | undefined;
}, {
timeout?: number | undefined;
maxDiffPixels?: number | undefined;
maxDiffPixelRatio?: number | undefined;
threshold?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
action: "assertSnapshot";
label?: string | undefined;
options?: {
timeout?: number | undefined;
maxDiffPixels?: number | undefined;
maxDiffPixelRatio?: number | undefined;
threshold?: number | undefined;
} | undefined;
description?: string | undefined;
name?: string | undefined;
locator?: LocatorParams | undefined;
}, {
action: "assertSnapshot";
label?: string | undefined;
options?: {
timeout?: number | undefined;
maxDiffPixels?: number | undefined;
maxDiffPixelRatio?: number | undefined;
threshold?: number | undefined;
} | undefined;
description?: string | undefined;
name?: string | undefined;
locator?: LocatorParams | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"click">;
options: z.ZodOptional<z.ZodObject<{
button: z.ZodOptional<z.ZodEnum<["left", "middle", "right"]>>;
clickCount: z.ZodOptional<z.ZodNumber>;
delay: z.ZodOptional<z.ZodNumber>;
force: z.ZodOptional<z.ZodBoolean>;
timeout: z.ZodOptional<z.ZodNumber>;
trial: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
button?: "left" | "middle" | "right" | undefined;
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
}, {
button?: "left" | "middle" | "right" | undefined;
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "click";
label?: string | undefined;
options?: {
button?: "left" | "middle" | "right" | undefined;
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "click";
label?: string | undefined;
options?: {
button?: "left" | "middle" | "right" | undefined;
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
clickCount?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"dblclick">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
force: z.ZodOptional<z.ZodBoolean>;
trial: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "dblclick";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "dblclick";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"fill">;
value: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
force: z.ZodOptional<z.ZodBoolean>;
timeout: z.ZodOptional<z.ZodNumber>;
noWaitAfter: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
noWaitAfter?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
noWaitAfter?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
value: string;
locator: LocatorParams;
action: "fill";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
noWaitAfter?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
value: string;
locator: LocatorParams;
action: "fill";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
noWaitAfter?: boolean | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"type">;
value: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
delay: z.ZodOptional<z.ZodNumber>;
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
delay?: number | undefined;
}, {
timeout?: number | undefined;
delay?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
value: string;
locator: LocatorParams;
action: "type";
label?: string | undefined;
options?: {
timeout?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
value: string;
locator: LocatorParams;
action: "type";
label?: string | undefined;
options?: {
timeout?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"press">;
key: z.ZodString;
options: z.ZodOptional<z.ZodObject<{
delay: z.ZodOptional<z.ZodNumber>;
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
delay?: number | undefined;
}, {
timeout?: number | undefined;
delay?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "press";
key: string;
label?: string | undefined;
options?: {
timeout?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "press";
key: string;
label?: string | undefined;
options?: {
timeout?: number | undefined;
delay?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"check">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
force: z.ZodOptional<z.ZodBoolean>;
trial: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "check";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "check";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"uncheck">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
force: z.ZodOptional<z.ZodBoolean>;
trial: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "uncheck";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "uncheck";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"selectOption">;
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
options: z.ZodOptional<z.ZodObject<{
force: z.ZodOptional<z.ZodBoolean>;
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
value: string | string[];
locator: LocatorParams;
action: "selectOption";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
value: string | string[];
locator: LocatorParams;
action: "selectOption";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"hover">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
force: z.ZodOptional<z.ZodBoolean>;
trial: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "hover";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "hover";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"focus">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
}, {
timeout?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "focus";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "focus";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"blur">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
}, {
timeout?: number | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "blur";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "blur";
label?: string | undefined;
options?: {
timeout?: number | undefined;
} | undefined;
description?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
label: z.ZodOptional<z.ZodString>;
}, {
description: z.ZodOptional<z.ZodString>;
}>, {
locator: z.ZodType<LocatorParams, z.ZodTypeDef, LocatorParams>;
}>, {
action: z.ZodLiteral<"clear">;
options: z.ZodOptional<z.ZodObject<{
timeout: z.ZodOptional<z.ZodNumber>;
force: z.ZodOptional<z.ZodBoolean>;
trial: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}, {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
locator: LocatorParams;
action: "clear";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;
trial?: boolean | undefined;
} | undefined;
description?: string | undefined;
}, {
locator: LocatorParams;
action: "clear";
label?: string | undefined;
options?: {
timeout?: number | undefined;
force?: boolean | undefined;