@applitools/nlp-web-runner 5.7.0 → 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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp=Object['defineProperty'],__exportAll=(F,f)=>{let v={};for(var O in F)__defProp(v,O,{'get':F[O],'enumerable':!![]});if(!f)__defProp(v,Symbol['toStringTag'],{'value':'Module'});return v;};export{__exportAll as t};
|
|
@@ -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,7 +116,7 @@ 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
121
|
element?: ElementDescriptor | ChromeElementDescriptor | DialogElementDescriptor;
|
|
122
122
|
};
|
|
@@ -298,10 +298,10 @@ type Pattern = {
|
|
|
298
298
|
name: PatternName;
|
|
299
299
|
});
|
|
300
300
|
type PatternName = 'number' | 'price' | 'percentage' | 'date' | 'time' | 'code';
|
|
301
|
-
type
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
type ExtractType = PrimitiveName<Any> | 'color' | 'background-color' | 'foreground-color';
|
|
302
|
+
type ExtractOperation = {
|
|
303
|
+
operator: 'extract';
|
|
304
|
+
operands: [Operand, ExtractType];
|
|
305
305
|
};
|
|
306
306
|
type OTP = {
|
|
307
307
|
isOTP: true;
|
|
@@ -329,12 +329,12 @@ type Condition = {
|
|
|
329
329
|
operation: ConditionOperation;
|
|
330
330
|
};
|
|
331
331
|
type Operation = ConditionOperation | ExpressionOperation;
|
|
332
|
-
type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation;
|
|
332
|
+
type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation | ExtractOperation;
|
|
333
333
|
type NumberOperation = AddOperation | SubOperation | MulOperation | DivOperation;
|
|
334
334
|
type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation;
|
|
335
335
|
type Operand = {
|
|
336
336
|
isOperand: true;
|
|
337
|
-
value: AnyExpression | ElementDescriptor |
|
|
337
|
+
value: AnyExpression | ElementDescriptor | DialogDescriptor | ExpressionOperation;
|
|
338
338
|
};
|
|
339
339
|
type ParensOperation = {
|
|
340
340
|
operator: 'parens';
|
|
@@ -464,6 +464,7 @@ type PopulatedOperation = {
|
|
|
464
464
|
type ElementScrollDirection = 'horizontal' | 'vertical' | 'both';
|
|
465
465
|
type ElementDescriptor = {
|
|
466
466
|
nth?: NumberExpression;
|
|
467
|
+
reference?: Reference<Any> | JSExpressionReference<Any>;
|
|
467
468
|
type?: ElementType | ElementType[];
|
|
468
469
|
title?: StringExpression | Pattern;
|
|
469
470
|
orderDirection?: 'forward' | 'backward';
|
|
@@ -772,7 +773,7 @@ declare class Rectangle {
|
|
|
772
773
|
//#region src/patterns.d.ts
|
|
773
774
|
type Match = (text: string) => string | null;
|
|
774
775
|
//#endregion
|
|
775
|
-
//#region dist/_inline/_chunks/script-
|
|
776
|
+
//#region dist/_inline/_chunks/script-CVsaWtX3.d.ts
|
|
776
777
|
//#region src/port.d.ts
|
|
777
778
|
interface PortMessageEvent<TName extends string = string, TPayload = unknown> extends Event {
|
|
778
779
|
readonly name: TName;
|
|
@@ -1419,6 +1420,7 @@ declare class Browser extends EventTargetNode<BrowserEventMap> implements Automa
|
|
|
1419
1420
|
getCookies(): Promise<import("devtools-protocol").Protocol.Network.Cookie[]>;
|
|
1420
1421
|
setCookies(cookies: Cookie[]): Promise<void>;
|
|
1421
1422
|
clearCookies(): Promise<void>;
|
|
1423
|
+
clearOriginStorage(origin: string): Promise<void>;
|
|
1422
1424
|
setWindowSize(size: {
|
|
1423
1425
|
width: number;
|
|
1424
1426
|
height: number;
|
|
@@ -8431,7 +8433,7 @@ interface IAXTreeView<TNode = unknown> extends Iterable<IAXNodeView<TNode>> {
|
|
|
8431
8433
|
}
|
|
8432
8434
|
//#endregion
|
|
8433
8435
|
//#region src/columbus/types.d.ts
|
|
8434
|
-
type ResolvedElementDescriptor = Omit<ElementDescriptor, 'title' | 'nth' | 'selector' | 'anchor' | 'color'> & {
|
|
8436
|
+
type ResolvedElementDescriptor = Omit<ElementDescriptor, 'title' | 'nth' | 'selector' | 'anchor' | 'color' | 'reference'> & {
|
|
8435
8437
|
nth?: number;
|
|
8436
8438
|
title?: string | Pattern;
|
|
8437
8439
|
color?: string;
|
|
@@ -8533,6 +8535,16 @@ type FindCandidatesOptions = {
|
|
|
8533
8535
|
interface AXProvider {
|
|
8534
8536
|
makeAXTree<TNode>(flat: AXTreeFlat<TNode>): Promise<IAXTreeView<TNode>>;
|
|
8535
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
|
+
}[]>;
|
|
8536
8548
|
findAXNode<TNode>(nodes: Iterable<IAXNodeView<TNode>>, descriptor: ResolvedElementDescriptor, options?: FindCandidatesOptions): Promise<CandidateMetric | null>;
|
|
8537
8549
|
/** Optional: remote providers may not support returning the full ranked candidate list. */
|
|
8538
8550
|
findAXNodes?<TNode>(nodes: Iterable<IAXNodeView<TNode>>, descriptor: ResolvedElementDescriptor, options?: FindCandidatesOptions): Promise<CandidateMetric[]>;
|
|
@@ -8828,7 +8840,7 @@ type ReferenceItem = {
|
|
|
8828
8840
|
};
|
|
8829
8841
|
type ExtractorItem = {
|
|
8830
8842
|
type: 'extractor';
|
|
8831
|
-
entity:
|
|
8843
|
+
entity: ExtractOperation;
|
|
8832
8844
|
value: Primitive<any>;
|
|
8833
8845
|
secret?: boolean;
|
|
8834
8846
|
};
|
|
@@ -8865,10 +8877,10 @@ declare class ValuesStack {
|
|
|
8865
8877
|
reference(entity: Reference<Any>, value: Any, meta?: {
|
|
8866
8878
|
secret?: boolean;
|
|
8867
8879
|
}): Any;
|
|
8868
|
-
extractor(entity:
|
|
8880
|
+
extractor(entity: ExtractOperation): (value: Primitive<any>, meta?: {
|
|
8869
8881
|
secret?: boolean;
|
|
8870
8882
|
}) => Primitive<any>;
|
|
8871
|
-
extractor(entity:
|
|
8883
|
+
extractor(entity: ExtractOperation, value: Primitive<any>, meta?: {
|
|
8872
8884
|
secret?: boolean;
|
|
8873
8885
|
}): Primitive<any>;
|
|
8874
8886
|
generator(entity: Generator$1): (value: Any, meta?: {
|
|
@@ -8919,35 +8931,35 @@ declare class ValuesStack {
|
|
|
8919
8931
|
value: Any;
|
|
8920
8932
|
}, void, unknown>;
|
|
8921
8933
|
extractors(): globalThis.Generator<{
|
|
8922
|
-
extractor:
|
|
8934
|
+
extractor: ExtractOperation;
|
|
8923
8935
|
value: unknown;
|
|
8924
8936
|
element: ResolvedElementDescriptor;
|
|
8925
8937
|
} | {
|
|
8926
|
-
extractor:
|
|
8938
|
+
extractor: ExtractOperation;
|
|
8927
8939
|
value: unknown;
|
|
8928
8940
|
element: ResolvedElementDescriptor;
|
|
8929
8941
|
} | {
|
|
8930
8942
|
secret?: boolean;
|
|
8931
|
-
extractor:
|
|
8943
|
+
extractor: ExtractOperation;
|
|
8932
8944
|
value: unknown;
|
|
8933
8945
|
element: ResolvedElementDescriptor;
|
|
8934
8946
|
} | {
|
|
8935
8947
|
secret?: boolean;
|
|
8936
|
-
extractor:
|
|
8948
|
+
extractor: ExtractOperation;
|
|
8937
8949
|
value: unknown;
|
|
8938
8950
|
element: ResolvedElementDescriptor;
|
|
8939
8951
|
} | {
|
|
8940
8952
|
secret?: boolean;
|
|
8941
|
-
extractor:
|
|
8953
|
+
extractor: ExtractOperation;
|
|
8942
8954
|
value: unknown;
|
|
8943
8955
|
element: ResolvedElementDescriptor;
|
|
8944
8956
|
} | {
|
|
8945
8957
|
secret?: boolean;
|
|
8946
|
-
extractor:
|
|
8958
|
+
extractor: ExtractOperation;
|
|
8947
8959
|
value: unknown;
|
|
8948
8960
|
element: ResolvedElementDescriptor;
|
|
8949
8961
|
} | {
|
|
8950
|
-
extractor:
|
|
8962
|
+
extractor: ExtractOperation;
|
|
8951
8963
|
value: unknown;
|
|
8952
8964
|
element: ResolvedElementDescriptor;
|
|
8953
8965
|
}, void, unknown>;
|
|
@@ -9209,6 +9221,7 @@ declare const ErrorCode: {
|
|
|
9209
9221
|
readonly UNRESPONSIVE_TAB: "UNRESPONSIVE_TAB";
|
|
9210
9222
|
readonly INTERNAL: "INTERNAL";
|
|
9211
9223
|
readonly MESSAGE_PARSING: "MESSAGE_PARSING";
|
|
9224
|
+
readonly INVALID_DATA: "INVALID_DATA";
|
|
9212
9225
|
readonly OBSCURED_ELEMENT: "OBSCURED_ELEMENT";
|
|
9213
9226
|
readonly FORBIDDEN_ACTION: "FORBIDDEN_ACTION";
|
|
9214
9227
|
readonly EXCEEDED_ALLOWED_TIMEOUT: "EXCEEDED_ALLOWED_TIMEOUT";
|
|
@@ -9218,7 +9231,7 @@ declare const ErrorCode: {
|
|
|
9218
9231
|
type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
9219
9232
|
//#endregion
|
|
9220
9233
|
//#region src/utils/evaluate-expression.d.ts
|
|
9221
|
-
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;
|
|
9222
9235
|
//#endregion
|
|
9223
9236
|
//#region src/handler.d.ts
|
|
9224
9237
|
type HandlerOptions<TAutomator extends Automator, TInstruction extends Instruction> = {
|
|
@@ -10261,7 +10274,7 @@ type UsedValues = {
|
|
|
10261
10274
|
value: Any;
|
|
10262
10275
|
secret?: boolean;
|
|
10263
10276
|
}>;
|
|
10264
|
-
extractors: Map<
|
|
10277
|
+
extractors: Map<ExtractOperation, {
|
|
10265
10278
|
value: Primitive<any>;
|
|
10266
10279
|
element?: ResolvedElementDescriptor;
|
|
10267
10280
|
}>;
|