@applitools/nlp-web-runner 5.6.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_inline/_chunks/rolldown-runtime-D7D4PA-g.js +1 -1
- package/dist/_inline/assets/{extract-ax-tree-DYEbctJp.js → extract-ax-tree-C1W4XHTq.js} +1 -1
- package/dist/_inline/assets/{extract-pdf-ax-tree-CxF87TEH.js → extract-pdf-ax-tree-DI_Yi3DA.js} +1 -1
- package/dist/_inline/assets/{recorder-BLcQX8wr.js → recorder-MSk-R6yL.js} +1 -1
- package/dist/_inline/assets/wipe-origin-storage-CF1Vf2FY.js +4 -0
- package/dist/_inline/nlp-runner/web/index.d.ts +77 -46
- package/dist/_inline/nlp-runner/web/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function () {
|
|
2
|
+
var wipeOriginStorage=(function(){async function e(){return t(),await n(),await a(),await o(),!0}function t(){try{localStorage.clear()}catch{}try{sessionStorage.clear()}catch{}}async function n(){try{let e=await indexedDB.databases();await Promise.all(e.map(e=>r(e)))}catch{}}function r(e){let t=new Promise(e=>setTimeout(e,3e3));return Promise.race([i(e),t])}function i(e){return new Promise(t=>{if(!e.name)return t();let n=indexedDB.open(e.name);n.onerror=()=>t(),n.onsuccess=()=>{let e=n.result;try{let n=Array.from(e.objectStoreNames);if(n.length===0)return e.close(),t();let r=e.transaction(n,`readwrite`);for(let e of n)r.objectStore(e).clear();r.oncomplete=r.onerror=r.onabort=()=>{e.close(),t()}}catch{e.close(),t()}}})}async function a(){try{let e=await caches.keys();await Promise.all(e.map(e=>caches.delete(e)))}catch{}}async function o(){try{let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(e=>e.unregister()))}catch{}}return e})();
|
|
3
|
+
return wipeOriginStorage.apply(null, arguments);
|
|
4
|
+
}
|
|
@@ -52,7 +52,7 @@ type SetVariableAction = {
|
|
|
52
52
|
secret?: boolean;
|
|
53
53
|
}[];
|
|
54
54
|
data: {
|
|
55
|
-
value: AnyExpression |
|
|
55
|
+
value: AnyExpression | ExtractOperation | Generator$1 | SizeOperation;
|
|
56
56
|
secret?: boolean;
|
|
57
57
|
};
|
|
58
58
|
scope?: 'public' | 'internal';
|
|
@@ -116,9 +116,9 @@ type EraseAction = {
|
|
|
116
116
|
};
|
|
117
117
|
type TypeAction = {
|
|
118
118
|
type: 'type';
|
|
119
|
-
value: AnyExpression |
|
|
119
|
+
value: AnyExpression | ExtractOperation | Generator$1;
|
|
120
120
|
secret?: boolean;
|
|
121
|
-
element?: ElementDescriptor | ChromeElementDescriptor;
|
|
121
|
+
element?: ElementDescriptor | ChromeElementDescriptor | DialogElementDescriptor;
|
|
122
122
|
};
|
|
123
123
|
type SearchAction = {
|
|
124
124
|
type: 'search';
|
|
@@ -141,6 +141,10 @@ type ClickChromeElementAction = {
|
|
|
141
141
|
type: 'click';
|
|
142
142
|
element: ChromeElementDescriptor;
|
|
143
143
|
};
|
|
144
|
+
type ClickDialogElementAction = {
|
|
145
|
+
type: 'click';
|
|
146
|
+
element: DialogElementDescriptor;
|
|
147
|
+
};
|
|
144
148
|
type HoverAction = {
|
|
145
149
|
type: 'hover';
|
|
146
150
|
element: ElementDescriptor;
|
|
@@ -175,11 +179,6 @@ type ScrollTheElementAction = {
|
|
|
175
179
|
distance: NumberExpression;
|
|
176
180
|
times?: NumberExpression;
|
|
177
181
|
};
|
|
178
|
-
type AlertAction = {
|
|
179
|
-
type: 'alert';
|
|
180
|
-
value: boolean;
|
|
181
|
-
condition?: ElementCondition;
|
|
182
|
-
};
|
|
183
182
|
type NavigatePdfAction = {
|
|
184
183
|
type: 'navigate pdf';
|
|
185
184
|
page: NumberExpression;
|
|
@@ -212,7 +211,7 @@ type CloseTargetAction = {
|
|
|
212
211
|
};
|
|
213
212
|
type CloseAction = {
|
|
214
213
|
type: 'close';
|
|
215
|
-
element: ElementDescriptor;
|
|
214
|
+
element: ElementDescriptor | DialogDescriptor;
|
|
216
215
|
};
|
|
217
216
|
type SwitchTargetByIndexAction = {
|
|
218
217
|
type: 'switch target';
|
|
@@ -242,7 +241,7 @@ type IntentAction = {
|
|
|
242
241
|
type: 'intent';
|
|
243
242
|
description: string;
|
|
244
243
|
};
|
|
245
|
-
type Action<TType extends string> = Extract<EmptyAction | CommentAction | SetVariableAction | SetValueAction | FetchAction | AssertAction | EvaluateAction | FocusAction | CheckAction | ClearAction | EraseAction | TypeAction | HitKeyAction | SearchAction | ClickElementAction | ClickChromeElementAction | HoverAction | ScrollByDistanceAction | ScrollByFractionAction | ScrollToPositionAction | ScrollToElementAction | ScrollTheElementAction |
|
|
244
|
+
type Action<TType extends string> = Extract<EmptyAction | CommentAction | SetVariableAction | SetValueAction | FetchAction | AssertAction | EvaluateAction | FocusAction | CheckAction | ClearAction | EraseAction | TypeAction | HitKeyAction | SearchAction | ClickElementAction | ClickChromeElementAction | ClickDialogElementAction | HoverAction | ScrollByDistanceAction | ScrollByFractionAction | ScrollToPositionAction | ScrollToElementAction | ScrollTheElementAction | NavigateToUrlAction | NavigateThroughHistoryAction | NavigatePdfAction | RefreshAction | CreateTargetAction | CloseTargetAction | CloseAction | SwitchTargetByIndexAction | SwitchTargetByTitleAction | SwitchTargetByPositionAction | WaitAction | GoAction | FindAction | VisualCheckAction | IntentAction, {
|
|
246
245
|
type: TType;
|
|
247
246
|
}>;
|
|
248
247
|
type Instruction = Action<any> | ControlFlow;
|
|
@@ -299,10 +298,10 @@ type Pattern = {
|
|
|
299
298
|
name: PatternName;
|
|
300
299
|
});
|
|
301
300
|
type PatternName = 'number' | 'price' | 'percentage' | 'date' | 'time' | 'code';
|
|
302
|
-
type
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
301
|
+
type ExtractType = PrimitiveName<Any> | 'color' | 'background-color' | 'foreground-color';
|
|
302
|
+
type ExtractOperation = {
|
|
303
|
+
operator: 'extract';
|
|
304
|
+
operands: [Operand, ExtractType];
|
|
306
305
|
};
|
|
307
306
|
type OTP = {
|
|
308
307
|
isOTP: true;
|
|
@@ -330,12 +329,12 @@ type Condition = {
|
|
|
330
329
|
operation: ConditionOperation;
|
|
331
330
|
};
|
|
332
331
|
type Operation = ConditionOperation | ExpressionOperation;
|
|
333
|
-
type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation;
|
|
332
|
+
type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation | ExtractOperation;
|
|
334
333
|
type NumberOperation = AddOperation | SubOperation | MulOperation | DivOperation;
|
|
335
334
|
type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation;
|
|
336
335
|
type Operand = {
|
|
337
336
|
isOperand: true;
|
|
338
|
-
value: AnyExpression | ElementDescriptor |
|
|
337
|
+
value: AnyExpression | ElementDescriptor | DialogDescriptor | ExpressionOperation;
|
|
339
338
|
};
|
|
340
339
|
type ParensOperation = {
|
|
341
340
|
operator: 'parens';
|
|
@@ -465,6 +464,7 @@ type PopulatedOperation = {
|
|
|
465
464
|
type ElementScrollDirection = 'horizontal' | 'vertical' | 'both';
|
|
466
465
|
type ElementDescriptor = {
|
|
467
466
|
nth?: NumberExpression;
|
|
467
|
+
reference?: Reference<Any> | JSExpressionReference<Any>;
|
|
468
468
|
type?: ElementType | ElementType[];
|
|
469
469
|
title?: StringExpression | Pattern;
|
|
470
470
|
orderDirection?: 'forward' | 'backward';
|
|
@@ -504,11 +504,15 @@ type RelativeAnchorDescriptor<TElement = ElementDescriptor> = {
|
|
|
504
504
|
};
|
|
505
505
|
type AbsoluteAnchorDescriptor<TElement = ElementDescriptor> = {
|
|
506
506
|
position: AbsolutePosition | AbsolutePosition[];
|
|
507
|
-
element?: TElement | ViewportDescriptor;
|
|
507
|
+
element?: TElement | ViewportDescriptor | DialogDescriptor;
|
|
508
508
|
};
|
|
509
509
|
type DialogDescriptor = {
|
|
510
510
|
isDialogDescriptor: true;
|
|
511
511
|
};
|
|
512
|
+
type DialogElementDescriptor = {
|
|
513
|
+
isDialogElementDescriptor: true;
|
|
514
|
+
title: 'ok' | 'cancel' | 'prompt';
|
|
515
|
+
};
|
|
512
516
|
type ChromeElementDescriptor = {
|
|
513
517
|
isChromeElementDescriptor: true;
|
|
514
518
|
title: 'refresh' | 'back' | 'forward' | 'url';
|
|
@@ -520,11 +524,6 @@ type CharacterKey = 'Backquote' | 'Digit1' | 'Digit2' | 'Digit3' | 'Digit4' | 'D
|
|
|
520
524
|
type ArrowKey = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';
|
|
521
525
|
type ControlKey = 'Escape' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'Backspace' | 'Tab' | 'CapsLock' | 'Enter' | 'ShiftLeft' | 'ShiftRight' | 'ControlLeft' | 'MetaLeft' | 'AltLeft' | 'Space' | 'AltRight' | 'AltGraph' | 'MetaRight' | 'ControlRight' | 'Delete' | 'Home' | 'End' | 'PageUp' | 'PageDown' | 'Insert';
|
|
522
526
|
type Key = ControlKey | ArrowKey | CharacterKey;
|
|
523
|
-
type ElementCondition = {
|
|
524
|
-
type: ConditionType;
|
|
525
|
-
element?: ElementDescriptor;
|
|
526
|
-
};
|
|
527
|
-
type ConditionType = 'exists' | 'not-exists' | 'visible' | 'not-visible' | 'clickable';
|
|
528
527
|
type ElementType = StructuralType | ControlType | ContentType;
|
|
529
528
|
type StructuralType = 'app' | 'host' | 'ad' | 'header' | 'footer' | 'sidebar' | 'popup' | 'tooltip' | 'modal' | 'scrollable' | 'form' | 'fieldset' | 'menu' | 'menuitem' | 'hamburger' | 'list' | 'listitem' | 'heading' | 'table' | 'table-cell' | 'table-head-cell' | 'table-row' | 'table-dom-row' | 'table-leaf-row' | 'table-head-row' | 'table-column' | 'table-leaf-column' | 'table-stub-column' | 'card' | 'pdfpage';
|
|
530
529
|
type ControlType = 'checkboxgroup' | 'checkbox' | 'radiogroup' | 'radio' | 'textbox' | 'combobox' | 'listbox' | 'option' | 'datepicker' | 'timepicker' | 'datetimepicker' | 'colorpicker' | 'filepicker' | 'slider' | 'inputbox' | 'selectbox' | 'valuebox' | 'button' | 'color';
|
|
@@ -711,6 +710,7 @@ declare class Rectangle {
|
|
|
711
710
|
width: number;
|
|
712
711
|
height: number;
|
|
713
712
|
}): Rectangle;
|
|
713
|
+
/** Builds the axis-aligned bounding box of a CDP quad, whose 4 corners come in transform-dependent order. */
|
|
714
714
|
static fromQuad(quad: number[]): Rectangle;
|
|
715
715
|
readonly left: number;
|
|
716
716
|
readonly top: number;
|
|
@@ -773,7 +773,7 @@ declare class Rectangle {
|
|
|
773
773
|
//#region src/patterns.d.ts
|
|
774
774
|
type Match = (text: string) => string | null;
|
|
775
775
|
//#endregion
|
|
776
|
-
//#region dist/_inline/_chunks/script-
|
|
776
|
+
//#region dist/_inline/_chunks/script-CVsaWtX3.d.ts
|
|
777
777
|
//#region src/port.d.ts
|
|
778
778
|
interface PortMessageEvent<TName extends string = string, TPayload = unknown> extends Event {
|
|
779
779
|
readonly name: TName;
|
|
@@ -1241,6 +1241,13 @@ declare class WebNode<TNode extends globalThis.Node = Element | Text> implements
|
|
|
1241
1241
|
button?: 'left' | 'middle' | 'right' | 'back' | 'forward';
|
|
1242
1242
|
times?: number;
|
|
1243
1243
|
}): Promise<void>;
|
|
1244
|
+
scrollIntoView({
|
|
1245
|
+
block,
|
|
1246
|
+
inline
|
|
1247
|
+
}?: {
|
|
1248
|
+
block?: ScrollLogicalPosition;
|
|
1249
|
+
inline?: ScrollLogicalPosition;
|
|
1250
|
+
}): Promise<void>;
|
|
1244
1251
|
tryToUnobscure(): Promise<void>;
|
|
1245
1252
|
isVisible(): Promise<boolean>;
|
|
1246
1253
|
getObscurationInfo(): Promise<{
|
|
@@ -1291,6 +1298,7 @@ type BlockingDialogOptions = {
|
|
|
1291
1298
|
};
|
|
1292
1299
|
declare function makeBlockingDialog(options: BlockingDialogOptions): BlockingDialog;
|
|
1293
1300
|
declare class BlockingDialog extends EventTargetNode<DialogEventMap> {
|
|
1301
|
+
#private;
|
|
1294
1302
|
readonly target: Target;
|
|
1295
1303
|
readonly type: 'alert' | 'confirm' | 'prompt' | 'beforeunload';
|
|
1296
1304
|
readonly message: string;
|
|
@@ -1299,6 +1307,8 @@ declare class BlockingDialog extends EventTargetNode<DialogEventMap> {
|
|
|
1299
1307
|
type,
|
|
1300
1308
|
message
|
|
1301
1309
|
}: BlockingDialogOptions);
|
|
1310
|
+
/** Whether the dialog was closed programmatically (as opposed to by the user). */
|
|
1311
|
+
get handled(): boolean;
|
|
1302
1312
|
handle(ok: boolean, text?: string): Promise<void>;
|
|
1303
1313
|
}
|
|
1304
1314
|
type FilepickerDialogOptions = {
|
|
@@ -1410,6 +1420,7 @@ declare class Browser extends EventTargetNode<BrowserEventMap> implements Automa
|
|
|
1410
1420
|
getCookies(): Promise<import("devtools-protocol").Protocol.Network.Cookie[]>;
|
|
1411
1421
|
setCookies(cookies: Cookie[]): Promise<void>;
|
|
1412
1422
|
clearCookies(): Promise<void>;
|
|
1423
|
+
clearOriginStorage(origin: string): Promise<void>;
|
|
1413
1424
|
setWindowSize(size: {
|
|
1414
1425
|
width: number;
|
|
1415
1426
|
height: number;
|
|
@@ -1828,7 +1839,14 @@ declare class TargetFrameTargetCreatedEvent extends Event {
|
|
|
1828
1839
|
declare class TargetDialogEvent extends Event {
|
|
1829
1840
|
readonly state: 'opened' | 'closed';
|
|
1830
1841
|
readonly dialog: BlockingDialog;
|
|
1831
|
-
|
|
1842
|
+
/** Whether the dialog was confirmed (only on `closed`). */
|
|
1843
|
+
readonly result?: boolean;
|
|
1844
|
+
/** The prompt input the dialog was confirmed with (only on `closed`). */
|
|
1845
|
+
readonly value?: string;
|
|
1846
|
+
constructor(state: 'opened' | 'closed', dialog: BlockingDialog, options?: {
|
|
1847
|
+
result?: boolean;
|
|
1848
|
+
value?: string;
|
|
1849
|
+
});
|
|
1832
1850
|
}
|
|
1833
1851
|
declare class TargetFilepickerDialogEvent extends Event {
|
|
1834
1852
|
readonly dialog: FilepickerDialog;
|
|
@@ -8415,7 +8433,7 @@ interface IAXTreeView<TNode = unknown> extends Iterable<IAXNodeView<TNode>> {
|
|
|
8415
8433
|
}
|
|
8416
8434
|
//#endregion
|
|
8417
8435
|
//#region src/columbus/types.d.ts
|
|
8418
|
-
type ResolvedElementDescriptor = Omit<ElementDescriptor, 'title' | 'nth' | 'selector' | 'anchor' | 'color'> & {
|
|
8436
|
+
type ResolvedElementDescriptor = Omit<ElementDescriptor, 'title' | 'nth' | 'selector' | 'anchor' | 'color' | 'reference'> & {
|
|
8419
8437
|
nth?: number;
|
|
8420
8438
|
title?: string | Pattern;
|
|
8421
8439
|
color?: string;
|
|
@@ -8517,6 +8535,16 @@ type FindCandidatesOptions = {
|
|
|
8517
8535
|
interface AXProvider {
|
|
8518
8536
|
makeAXTree<TNode>(flat: AXTreeFlat<TNode>): Promise<IAXTreeView<TNode>>;
|
|
8519
8537
|
describeAXNode<TNode>(tree: IAXTreeView<TNode>, query: ElementDescriptorQuery<IAXNodeView<TNode>>): Promise<ResolvedElementDescriptor | undefined>;
|
|
8538
|
+
describeAXNodeOptions?<TNode>(tree: IAXTreeView<TNode>, query: ElementDescriptorQuery<IAXNodeView<TNode>>, options?: {
|
|
8539
|
+
limit?: number;
|
|
8540
|
+
minScore?: number;
|
|
8541
|
+
}): {
|
|
8542
|
+
descriptor: ResolvedElementDescriptor;
|
|
8543
|
+
score: number;
|
|
8544
|
+
}[] | Promise<{
|
|
8545
|
+
descriptor: ResolvedElementDescriptor;
|
|
8546
|
+
score: number;
|
|
8547
|
+
}[]>;
|
|
8520
8548
|
findAXNode<TNode>(nodes: Iterable<IAXNodeView<TNode>>, descriptor: ResolvedElementDescriptor, options?: FindCandidatesOptions): Promise<CandidateMetric | null>;
|
|
8521
8549
|
/** Optional: remote providers may not support returning the full ranked candidate list. */
|
|
8522
8550
|
findAXNodes?<TNode>(nodes: Iterable<IAXNodeView<TNode>>, descriptor: ResolvedElementDescriptor, options?: FindCandidatesOptions): Promise<CandidateMetric[]>;
|
|
@@ -8812,7 +8840,7 @@ type ReferenceItem = {
|
|
|
8812
8840
|
};
|
|
8813
8841
|
type ExtractorItem = {
|
|
8814
8842
|
type: 'extractor';
|
|
8815
|
-
entity:
|
|
8843
|
+
entity: ExtractOperation;
|
|
8816
8844
|
value: Primitive<any>;
|
|
8817
8845
|
secret?: boolean;
|
|
8818
8846
|
};
|
|
@@ -8849,10 +8877,10 @@ declare class ValuesStack {
|
|
|
8849
8877
|
reference(entity: Reference<Any>, value: Any, meta?: {
|
|
8850
8878
|
secret?: boolean;
|
|
8851
8879
|
}): Any;
|
|
8852
|
-
extractor(entity:
|
|
8880
|
+
extractor(entity: ExtractOperation): (value: Primitive<any>, meta?: {
|
|
8853
8881
|
secret?: boolean;
|
|
8854
8882
|
}) => Primitive<any>;
|
|
8855
|
-
extractor(entity:
|
|
8883
|
+
extractor(entity: ExtractOperation, value: Primitive<any>, meta?: {
|
|
8856
8884
|
secret?: boolean;
|
|
8857
8885
|
}): Primitive<any>;
|
|
8858
8886
|
generator(entity: Generator$1): (value: Any, meta?: {
|
|
@@ -8903,35 +8931,35 @@ declare class ValuesStack {
|
|
|
8903
8931
|
value: Any;
|
|
8904
8932
|
}, void, unknown>;
|
|
8905
8933
|
extractors(): globalThis.Generator<{
|
|
8906
|
-
extractor:
|
|
8934
|
+
extractor: ExtractOperation;
|
|
8907
8935
|
value: unknown;
|
|
8908
8936
|
element: ResolvedElementDescriptor;
|
|
8909
8937
|
} | {
|
|
8910
|
-
extractor:
|
|
8938
|
+
extractor: ExtractOperation;
|
|
8911
8939
|
value: unknown;
|
|
8912
8940
|
element: ResolvedElementDescriptor;
|
|
8913
8941
|
} | {
|
|
8914
8942
|
secret?: boolean;
|
|
8915
|
-
extractor:
|
|
8943
|
+
extractor: ExtractOperation;
|
|
8916
8944
|
value: unknown;
|
|
8917
8945
|
element: ResolvedElementDescriptor;
|
|
8918
8946
|
} | {
|
|
8919
8947
|
secret?: boolean;
|
|
8920
|
-
extractor:
|
|
8948
|
+
extractor: ExtractOperation;
|
|
8921
8949
|
value: unknown;
|
|
8922
8950
|
element: ResolvedElementDescriptor;
|
|
8923
8951
|
} | {
|
|
8924
8952
|
secret?: boolean;
|
|
8925
|
-
extractor:
|
|
8953
|
+
extractor: ExtractOperation;
|
|
8926
8954
|
value: unknown;
|
|
8927
8955
|
element: ResolvedElementDescriptor;
|
|
8928
8956
|
} | {
|
|
8929
8957
|
secret?: boolean;
|
|
8930
|
-
extractor:
|
|
8958
|
+
extractor: ExtractOperation;
|
|
8931
8959
|
value: unknown;
|
|
8932
8960
|
element: ResolvedElementDescriptor;
|
|
8933
8961
|
} | {
|
|
8934
|
-
extractor:
|
|
8962
|
+
extractor: ExtractOperation;
|
|
8935
8963
|
value: unknown;
|
|
8936
8964
|
element: ResolvedElementDescriptor;
|
|
8937
8965
|
}, void, unknown>;
|
|
@@ -9183,6 +9211,7 @@ declare const ErrorCode: {
|
|
|
9183
9211
|
readonly ELEMENT_NOT_CLEARABLE: "ELEMENT_NOT_CLEARABLE";
|
|
9184
9212
|
readonly UNHANDLED_DIALOG: "UNHANDLED_DIALOG";
|
|
9185
9213
|
readonly NO_ELEMENT: "NO_ELEMENT";
|
|
9214
|
+
readonly ILLEGAL_ELEMENT_DESCRIPTOR: "ILLEGAL_ELEMENT_DESCRIPTOR";
|
|
9186
9215
|
readonly NO_OPTION: "NO_OPTION";
|
|
9187
9216
|
readonly NO_DIALOG: "NO_DIALOG";
|
|
9188
9217
|
readonly CONDITION_TIMED_OUT: "CONDITION_TIMED_OUT";
|
|
@@ -9192,6 +9221,7 @@ declare const ErrorCode: {
|
|
|
9192
9221
|
readonly UNRESPONSIVE_TAB: "UNRESPONSIVE_TAB";
|
|
9193
9222
|
readonly INTERNAL: "INTERNAL";
|
|
9194
9223
|
readonly MESSAGE_PARSING: "MESSAGE_PARSING";
|
|
9224
|
+
readonly INVALID_DATA: "INVALID_DATA";
|
|
9195
9225
|
readonly OBSCURED_ELEMENT: "OBSCURED_ELEMENT";
|
|
9196
9226
|
readonly FORBIDDEN_ACTION: "FORBIDDEN_ACTION";
|
|
9197
9227
|
readonly EXCEEDED_ALLOWED_TIMEOUT: "EXCEEDED_ALLOWED_TIMEOUT";
|
|
@@ -9201,7 +9231,7 @@ declare const ErrorCode: {
|
|
|
9201
9231
|
type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
9202
9232
|
//#endregion
|
|
9203
9233
|
//#region src/utils/evaluate-expression.d.ts
|
|
9204
|
-
type EvaluatedExpression<TValue> = TValue extends
|
|
9234
|
+
type EvaluatedExpression<TValue> = TValue extends ExtractOperation ? Any : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation ? Any[] : TValue extends Condition ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor ? ResolvedElementDescriptor : TValue;
|
|
9205
9235
|
//#endregion
|
|
9206
9236
|
//#region src/handler.d.ts
|
|
9207
9237
|
type HandlerOptions<TAutomator extends Automator, TInstruction extends Instruction> = {
|
|
@@ -9310,6 +9340,10 @@ declare abstract class Handler$1<TAutomator extends Automator, TInstruction exte
|
|
|
9310
9340
|
mobile: IAXNodeView<IOSNode> | null;
|
|
9311
9341
|
}[TAutomator["type"]]>;
|
|
9312
9342
|
capture(): Promise<Capture | undefined>;
|
|
9343
|
+
/** Best-effort scroll bringing the elements matched by this handler into the viewport, so the
|
|
9344
|
+
* `after` capture shows them. Call it after the instruction's page reads are done — the scroll
|
|
9345
|
+
* persists. No-op without `shouldCapture` or off web. */
|
|
9346
|
+
reveal(): Promise<void>;
|
|
9313
9347
|
before(): Promise<void>;
|
|
9314
9348
|
after(): Promise<void>;
|
|
9315
9349
|
}
|
|
@@ -9574,6 +9608,9 @@ declare class ClickHandler$1 extends Handler$1<Browser, Action<'click'>> {
|
|
|
9574
9608
|
handle(): Promise<{
|
|
9575
9609
|
status: "success";
|
|
9576
9610
|
}>;
|
|
9611
|
+
handleWithDialogElementDescriptor(descriptor: DialogElementDescriptor): Promise<{
|
|
9612
|
+
status: "success";
|
|
9613
|
+
}>;
|
|
9577
9614
|
handleWithChromeElementDescriptor(descriptor: ChromeElementDescriptor): Promise<{
|
|
9578
9615
|
status: "success";
|
|
9579
9616
|
}>;
|
|
@@ -9587,6 +9624,9 @@ declare class TypeHandler$1 extends Handler$1<Browser, Action<'type'>> {
|
|
|
9587
9624
|
handle(): Promise<{
|
|
9588
9625
|
status: "success";
|
|
9589
9626
|
}>;
|
|
9627
|
+
handleWithDialogElementDescriptor(): Promise<{
|
|
9628
|
+
status: "success";
|
|
9629
|
+
}>;
|
|
9590
9630
|
}
|
|
9591
9631
|
//#endregion
|
|
9592
9632
|
//#region src/handlers/web/clear.d.ts
|
|
@@ -9726,13 +9766,6 @@ declare class GoHandler extends Handler$1<Browser, Action<'go'>, NavigateResult
|
|
|
9726
9766
|
}>;
|
|
9727
9767
|
}
|
|
9728
9768
|
//#endregion
|
|
9729
|
-
//#region src/handlers/web/handle-dialog.d.ts
|
|
9730
|
-
declare class HandleDialogHandler extends Handler$1<Browser, Action<'alert'>> {
|
|
9731
|
-
handle(): Promise<{
|
|
9732
|
-
status: "success";
|
|
9733
|
-
}>;
|
|
9734
|
-
}
|
|
9735
|
-
//#endregion
|
|
9736
9769
|
//#region src/handlers/web/hit-key.d.ts
|
|
9737
9770
|
declare class HitKeyHandler extends Handler$1<Browser, Action<'hit key'>> {
|
|
9738
9771
|
handle(): Promise<{
|
|
@@ -9848,7 +9881,6 @@ declare const handlers: {
|
|
|
9848
9881
|
evaluate: typeof EvaluateHandler;
|
|
9849
9882
|
find: typeof FindHandler$1;
|
|
9850
9883
|
focus: typeof FocusHandler$1;
|
|
9851
|
-
alert: typeof HandleDialogHandler;
|
|
9852
9884
|
'hit key': typeof HitKeyHandler;
|
|
9853
9885
|
hover: typeof HoverHandler;
|
|
9854
9886
|
navigate: typeof NavigateHandler;
|
|
@@ -9901,7 +9933,6 @@ declare const handlers: {
|
|
|
9901
9933
|
"hit key": never;
|
|
9902
9934
|
search: never;
|
|
9903
9935
|
hover: never;
|
|
9904
|
-
alert: never;
|
|
9905
9936
|
navigate: never;
|
|
9906
9937
|
"navigate pdf": never;
|
|
9907
9938
|
refresh: never;
|
|
@@ -10243,7 +10274,7 @@ type UsedValues = {
|
|
|
10243
10274
|
value: Any;
|
|
10244
10275
|
secret?: boolean;
|
|
10245
10276
|
}>;
|
|
10246
|
-
extractors: Map<
|
|
10277
|
+
extractors: Map<ExtractOperation, {
|
|
10247
10278
|
value: Primitive<any>;
|
|
10248
10279
|
element?: ResolvedElementDescriptor;
|
|
10249
10280
|
}>;
|