@empiricalrun/playwright-utils 0.8.3 → 0.8.4
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/CHANGELOG.md +8 -0
- package/dist/captcha.js +6 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/captcha.js
CHANGED
|
@@ -40,15 +40,15 @@ async function clickImageTile(frame, nth) {
|
|
|
40
40
|
await image.dispatchEvent("click");
|
|
41
41
|
}
|
|
42
42
|
async function handleCaptcha(cf) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const screenshot = await cf.frame
|
|
44
|
+
.locator(".rc-imageselect-challenge")
|
|
45
|
+
.screenshot();
|
|
46
|
+
const gridBoxesToSelect = await (0, vision_1.solveRecaptchaGrid)({
|
|
46
47
|
captchaType: cf.type,
|
|
47
|
-
pageScreenshotBase64: screenshot.toString("base64"),
|
|
48
|
-
captchaBoundingBox: (await gridLocator.boundingBox()),
|
|
49
48
|
captchaObject: (await getObjectiveCaptcha(cf)),
|
|
49
|
+
screenshotBase64: screenshot.toString("base64"),
|
|
50
50
|
});
|
|
51
|
-
for (const n of
|
|
51
|
+
for (const n of gridBoxesToSelect) {
|
|
52
52
|
await clickImageTile(cf.frame, n - 1);
|
|
53
53
|
}
|
|
54
54
|
const verifyButton = cf.frame.getByRole("button", { name: "Verify" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/playwright-utils",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"md5": "^2.3.0",
|
|
37
37
|
"mime": "3.0.0",
|
|
38
38
|
"playwright-core": "^1.46.1",
|
|
39
|
-
"@empiricalrun/llm": "^0.8.
|
|
39
|
+
"@empiricalrun/llm": "^0.8.3"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"dev": "tsc --build --watch",
|