@skrillex1224/playwright-toolkit 3.0.36 → 3.0.38
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/index.cjs +1 -18
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +1 -18
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4007,10 +4007,6 @@ var Humanize = {
|
|
|
4007
4007
|
const y = 100 + Math.random() * (viewportSize.height - 200);
|
|
4008
4008
|
await cursor.actions.move({ x, y });
|
|
4009
4009
|
await (0, import_delay2.default)(this.jitterMs(350, 0.4));
|
|
4010
|
-
} else if (action < 0.7) {
|
|
4011
|
-
const scrollY = (Math.random() - 0.5) * 200;
|
|
4012
|
-
await page.mouse.wheel(0, scrollY);
|
|
4013
|
-
await (0, import_delay2.default)(this.jitterMs(500, 0.4));
|
|
4014
4010
|
} else {
|
|
4015
4011
|
await (0, import_delay2.default)(this.jitterMs(800, 0.5));
|
|
4016
4012
|
}
|
|
@@ -4970,20 +4966,7 @@ var MobileHumanize = {
|
|
|
4970
4966
|
const durationMs = jitterMs(baseDuration, 0.4);
|
|
4971
4967
|
const startTime = Date.now();
|
|
4972
4968
|
while (Date.now() - startTime < durationMs) {
|
|
4973
|
-
|
|
4974
|
-
if (action < 0.5) {
|
|
4975
|
-
await dispatchTouchSwipe(page, 120 + Math.random() * 220, {
|
|
4976
|
-
durationMs: 240,
|
|
4977
|
-
steps: 5
|
|
4978
|
-
});
|
|
4979
|
-
} else if (action < 0.7) {
|
|
4980
|
-
await dispatchTouchSwipe(page, -(80 + Math.random() * 160), {
|
|
4981
|
-
durationMs: 220,
|
|
4982
|
-
steps: 4
|
|
4983
|
-
});
|
|
4984
|
-
} else {
|
|
4985
|
-
await waitJitter(560, 0.55);
|
|
4986
|
-
}
|
|
4969
|
+
await waitJitter(560, 0.55);
|
|
4987
4970
|
}
|
|
4988
4971
|
},
|
|
4989
4972
|
async naturalScroll(page, direction = "down", distance = 300, baseSteps = 5) {
|