Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@qawolf/web

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qawolf/web - npm Package Compare versions

Comparing version 0.5.12 to 0.5.13

6

lib/index.d.ts

@@ -12,7 +12,7 @@ import * as element from "./element";

declare const isKeyEvent: (event: import("@qawolf/types").Event | null) => boolean | null, isPasteEvent: (event: import("@qawolf/types").Event | null) => boolean | null;
declare const compareArrays: (base?: string[] | null | undefined, compare?: string[] | null | undefined) => number, compareDescriptorKey: (key: "title" | "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "xpath", targetValue: string | boolean | string[] | null | undefined, compareValue: string | boolean | string[] | null | undefined) => {
key: "title" | "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "xpath";
declare const compareArrays: (base?: string[] | null | undefined, compare?: string[] | null | undefined) => number, compareDescriptorKey: (key: "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "title" | "xpath", targetValue: string | boolean | string[] | null | undefined, compareValue: string | boolean | string[] | null | undefined) => {
key: "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "title" | "xpath";
percent: number;
}, compareDescriptors: (target: import("@qawolf/types").ElementDescriptor, compare: import("@qawolf/types").ElementDescriptor) => {
key: "title" | "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "xpath";
key: "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "title" | "xpath";
percent: number;

@@ -19,0 +19,0 @@ }[], countPresentKeys: (descriptor: import("@qawolf/types").ElementDescriptor) => number, isNil: (value?: any) => boolean;

@@ -23,4 +23,4 @@ import { ElementDescriptor } from "@qawolf/types";

export declare const compareArrays: (base?: string[] | null | undefined, compare?: string[] | null | undefined) => number;
export declare const compareDescriptorKey: (key: "title" | "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "xpath", targetValue: DescriptorValue, compareValue: DescriptorValue) => {
key: "title" | "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "xpath";
export declare const compareDescriptorKey: (key: "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "title" | "xpath", targetValue: DescriptorValue, compareValue: DescriptorValue) => {
key: "alt" | "ariaLabel" | "classList" | "dataValue" | "href" | "iconContent" | "id" | "inputType" | "isContentEditable" | "labels" | "name" | "parentText" | "placeholder" | "src" | "tagName" | "innerText" | "title" | "xpath";
percent: number;

@@ -27,0 +27,0 @@ };

@@ -97,3 +97,3 @@ "use strict";

if (matches.length <= 0 || matches[0].value <= 0) {
console.log("no top match for", args, "\nno matches with a value > 0", matches);
console.log("no top match: all 0", matches);
return null;

@@ -103,3 +103,3 @@ }

if (equalTopMatches.length > 1) {
console.log("no top match for", args, "\nall matches are equal", equalTopMatches);
console.log("no top match: all equal", equalTopMatches);
return null;

@@ -112,5 +112,5 @@ }

const selected = matches[0];
console.log("found top match", selected.element, "for", args, "targetMatches", selected.targetMatches, "value", selected.value);
console.log("found top match", selected.element, "targetMatches", selected.targetMatches, "value", selected.value);
return selected;
};
//# sourceMappingURL=match.js.map

@@ -403,3 +403,3 @@ var qawolf = (function (exports) {

if (matches.length <= 0 || matches[0].value <= 0) {
console.log("no top match for", args, "\nno matches with a value > 0", matches);
console.log("no top match: all 0", matches);
return null;

@@ -409,3 +409,3 @@ }

if (equalTopMatches.length > 1) {
console.log("no top match for", args, "\nall matches are equal", equalTopMatches);
console.log("no top match: all equal", equalTopMatches);
return null;

@@ -418,3 +418,3 @@ }

var selected = matches[0];
console.log("found top match", selected.element, "for", args, "targetMatches", selected.targetMatches, "value", selected.value);
console.log("found top match", selected.element, "targetMatches", selected.targetMatches, "value", selected.value);
return selected;

@@ -448,3 +448,2 @@ };

case 1:
if (!(Date.now() - startTime < timeoutMs)) return [3 /*break*/, 3];
value = valueFn();

@@ -456,4 +455,7 @@ if (value)

_a.sent();
return [3 /*break*/, 1];
case 3: return [2 /*return*/, null];
_a.label = 3;
case 3:
if (Date.now() - startTime < timeoutMs) return [3 /*break*/, 1];
_a.label = 4;
case 4: return [2 /*return*/, null];
}

@@ -472,5 +474,3 @@ });

_a.label = 1;
case 1:
if (!(Date.now() - startTime < timeoutMs)) return [3 /*break*/, 4];
return [4 /*yield*/, booleanFn()];
case 1: return [4 /*yield*/, booleanFn()];
case 2:

@@ -483,4 +483,7 @@ conditionMet = _a.sent();

_a.sent();
return [3 /*break*/, 1];
case 4: throw new Error("waitUntil: waited " + timeoutMs + " milliseconds but condition never met");
_a.label = 4;
case 4:
if (Date.now() - startTime < timeoutMs) return [3 /*break*/, 1];
_a.label = 5;
case 5: throw new Error("waitUntil: waited " + timeoutMs + " milliseconds but condition never met");
}

@@ -487,0 +490,0 @@ });

@@ -17,3 +17,3 @@ "use strict";

const startTime = Date.now();
while (Date.now() - startTime < timeoutMs) {
do {
const value = valueFn();

@@ -23,3 +23,3 @@ if (value)

yield exports.sleep(sleepMs);
}
} while (Date.now() - startTime < timeoutMs);
return null;

@@ -29,3 +29,3 @@ });

const startTime = Date.now();
while (Date.now() - startTime < timeoutMs) {
do {
const conditionMet = yield booleanFn();

@@ -35,5 +35,5 @@ if (conditionMet)

yield exports.sleep(sleepMs);
}
} while (Date.now() - startTime < timeoutMs);
throw new Error(`waitUntil: waited ${timeoutMs} milliseconds but condition never met`);
});
//# sourceMappingURL=wait.js.map
{
"name": "@qawolf/web",
"description": "qawolf web library",
"version": "0.5.12",
"version": "0.5.13",
"license": "BSD-3.0",

@@ -33,3 +33,3 @@ "main": "./lib/index.js",

},
"gitHead": "f4ac1245b88c32309fa357e627185b33cfd861d3"
"gitHead": "1f45cf076bcbf323229d5e263e0b8ecf40440a7a"
}

@@ -172,8 +172,3 @@ import { ElementDescriptor } from "@qawolf/types";

if (matches.length <= 0 || matches[0].value <= 0) {
console.log(
"no top match for",
args,
"\nno matches with a value > 0",
matches
);
console.log("no top match: all 0", matches);
return null;

@@ -184,8 +179,3 @@ }

if (equalTopMatches.length > 1) {
console.log(
"no top match for",
args,
"\nall matches are equal",
equalTopMatches
);
console.log("no top match: all equal", equalTopMatches);
return null;

@@ -203,4 +193,2 @@ }

selected.element,
"for",
args,
"targetMatches",

@@ -207,0 +195,0 @@ selected.targetMatches,

@@ -12,3 +12,3 @@ export const sleep = (milliseconds: number): Promise<void> => {

while (Date.now() - startTime < timeoutMs) {
do {
const value = valueFn();

@@ -18,3 +18,3 @@ if (value) return value;

await sleep(sleepMs);
}
} while (Date.now() - startTime < timeoutMs);

@@ -31,3 +31,3 @@ return null;

while (Date.now() - startTime < timeoutMs) {
do {
const conditionMet = await booleanFn();

@@ -37,3 +37,3 @@ if (conditionMet) return;

await sleep(sleepMs);
}
} while (Date.now() - startTime < timeoutMs);

@@ -40,0 +40,0 @@ throw new Error(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc