pure-patchright 1.62.3__py3-none-any.whl
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.
- patchright/__init__.py +5 -0
- patchright/__main__.py +18 -0
- patchright/_impl/__init__.py +0 -0
- patchright/_impl/__pyinstaller/__init__.py +20 -0
- patchright/_impl/__pyinstaller/hook-playwright.async_api.py +3 -0
- patchright/_impl/__pyinstaller/hook-playwright.sync_api.py +3 -0
- patchright/_impl/_api_structures.py +343 -0
- patchright/_impl/_artifact.py +46 -0
- patchright/_impl/_assertions.py +1014 -0
- patchright/_impl/_async_base.py +88 -0
- patchright/_impl/_browser.py +267 -0
- patchright/_impl/_browser_context.py +759 -0
- patchright/_impl/_browser_type.py +336 -0
- patchright/_impl/_cdp_session.py +25 -0
- patchright/_impl/_clock.py +62 -0
- patchright/_impl/_connection.py +686 -0
- patchright/_impl/_console_message.py +83 -0
- patchright/_impl/_credentials.py +38 -0
- patchright/_impl/_debugger.py +37 -0
- patchright/_impl/_dialog.py +45 -0
- patchright/_impl/_disposable.py +71 -0
- patchright/_impl/_download.py +49 -0
- patchright/_impl/_driver.py +24 -0
- patchright/_impl/_element_handle.py +446 -0
- patchright/_impl/_errors.py +46 -0
- patchright/_impl/_event_context_manager.py +19 -0
- patchright/_impl/_fetch.py +592 -0
- patchright/_impl/_file_chooser.py +42 -0
- patchright/_impl/_form_data.py +19 -0
- patchright/_impl/_frame.py +959 -0
- patchright/_impl/_glob.py +47 -0
- patchright/_impl/_greenlets.py +35 -0
- patchright/_impl/_har_router.py +98 -0
- patchright/_impl/_helper.py +551 -0
- patchright/_impl/_impl_to_api_mapping.py +141 -0
- patchright/_impl/_input.py +85 -0
- patchright/_impl/_js_handle.py +297 -0
- patchright/_impl/_json_pipe.py +55 -0
- patchright/_impl/_local_utils.py +73 -0
- patchright/_impl/_locator.py +894 -0
- patchright/_impl/_map.py +18 -0
- patchright/_impl/_network.py +953 -0
- patchright/_impl/_object_factory.py +93 -0
- patchright/_impl/_page.py +1601 -0
- patchright/_impl/_path_utils.py +13 -0
- patchright/_impl/_playwright.py +43 -0
- patchright/_impl/_screencast.py +149 -0
- patchright/_impl/_selectors.py +48 -0
- patchright/_impl/_set_input_files_helpers.py +134 -0
- patchright/_impl/_str_utils.py +59 -0
- patchright/_impl/_stream.py +31 -0
- patchright/_impl/_sync_base.py +130 -0
- patchright/_impl/_tracing.py +243 -0
- patchright/_impl/_transport.py +151 -0
- patchright/_impl/_video.py +41 -0
- patchright/_impl/_waiter.py +168 -0
- patchright/_impl/_web_error.py +33 -0
- patchright/_impl/_web_storage.py +41 -0
- patchright/_impl/_writable_stream.py +26 -0
- patchright/_repo_version.py +1 -0
- patchright/async_api/__init__.py +234 -0
- patchright/async_api/_context_manager.py +38 -0
- patchright/async_api/_generated.py +23396 -0
- patchright/driver/README.md +1 -0
- patchright/driver/package/README.md +3 -0
- patchright/driver/package/ThirdPartyNotices.txt +13 -0
- patchright/driver/package/bin/install_media_pack.ps1 +5 -0
- patchright/driver/package/bin/install_webkit_wsl.ps1 +33 -0
- patchright/driver/package/bin/reinstall_chrome_beta_linux.sh +42 -0
- patchright/driver/package/bin/reinstall_chrome_beta_mac.sh +13 -0
- patchright/driver/package/bin/reinstall_chrome_beta_win.ps1 +24 -0
- patchright/driver/package/bin/reinstall_chrome_stable_linux.sh +42 -0
- patchright/driver/package/bin/reinstall_chrome_stable_mac.sh +12 -0
- patchright/driver/package/bin/reinstall_chrome_stable_win.ps1 +24 -0
- patchright/driver/package/bin/reinstall_msedge_beta_linux.sh +48 -0
- patchright/driver/package/bin/reinstall_msedge_beta_mac.sh +11 -0
- patchright/driver/package/bin/reinstall_msedge_beta_win.ps1 +23 -0
- patchright/driver/package/bin/reinstall_msedge_dev_linux.sh +48 -0
- patchright/driver/package/bin/reinstall_msedge_dev_mac.sh +11 -0
- patchright/driver/package/bin/reinstall_msedge_dev_win.ps1 +23 -0
- patchright/driver/package/bin/reinstall_msedge_stable_linux.sh +48 -0
- patchright/driver/package/bin/reinstall_msedge_stable_mac.sh +11 -0
- patchright/driver/package/bin/reinstall_msedge_stable_win.ps1 +24 -0
- patchright/driver/package/browsers.json +75 -0
- patchright/driver/package/cli.js +21 -0
- patchright/driver/package/index.js +17 -0
- patchright/driver/package/index.mjs +28 -0
- patchright/driver/package/lib/bootstrap.js +88 -0
- patchright/driver/package/lib/coreBundle.js +77498 -0
- patchright/driver/package/lib/entry/cliDaemon.js +5 -0
- patchright/driver/package/lib/entry/dashboardApp.js +3 -0
- patchright/driver/package/lib/entry/mcp.js +10 -0
- patchright/driver/package/lib/entry/oopBrowserDownload.js +3 -0
- patchright/driver/package/lib/package.js +50 -0
- patchright/driver/package/lib/server/chromium/appIcon.png +0 -0
- patchright/driver/package/lib/server/electron/loader.js +107 -0
- patchright/driver/package/lib/serverRegistry.js +7347 -0
- patchright/driver/package/lib/serverRegistry.js.LICENSE +354 -0
- patchright/driver/package/lib/tools/cli-client/channelSessions.js +141 -0
- patchright/driver/package/lib/tools/cli-client/cli.js +6 -0
- patchright/driver/package/lib/tools/cli-client/help.json +708 -0
- patchright/driver/package/lib/tools/cli-client/minimist.js +128 -0
- patchright/driver/package/lib/tools/cli-client/output.js +343 -0
- patchright/driver/package/lib/tools/cli-client/program.js +404 -0
- patchright/driver/package/lib/tools/cli-client/registry.js +176 -0
- patchright/driver/package/lib/tools/cli-client/session.js +258 -0
- patchright/driver/package/lib/tools/dashboard/appIcon.png +0 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/SKILL.md +420 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/running-code.md +241 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/session-management.md +225 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- patchright/driver/package/lib/tools/skills/playwright-cli/references/video-recording.md +143 -0
- patchright/driver/package/lib/tools/skills/playwright-component-testing/SKILL.md +143 -0
- patchright/driver/package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- patchright/driver/package/lib/tools/skills/playwright-component-testing/references/migration.md +85 -0
- patchright/driver/package/lib/tools/skills/playwright-component-testing/references/react.md +67 -0
- patchright/driver/package/lib/tools/skills/playwright-component-testing/references/vue.md +75 -0
- patchright/driver/package/lib/tools/skills/playwright-trace/SKILL.md +171 -0
- patchright/driver/package/lib/tools/utils/extension.js +101 -0
- patchright/driver/package/lib/tools/utils/socketConnection.js +108 -0
- patchright/driver/package/lib/utilsBundle.js +90764 -0
- patchright/driver/package/lib/utilsBundle.js.LICENSE +2179 -0
- patchright/driver/package/lib/webp_codec.LICENSE +173 -0
- patchright/driver/package/lib/webp_codec.wasm +0 -0
- patchright/driver/package/lib/xdg-open +1267 -0
- patchright/driver/package/package.json +34 -0
- patchright/py.typed +0 -0
- patchright/sync_api/__init__.py +234 -0
- patchright/sync_api/_context_manager.py +73 -0
- patchright/sync_api/_generated.py +23590 -0
- pure_patchright-1.62.3.dist-info/LICENSE +201 -0
- pure_patchright-1.62.3.dist-info/METADATA +96 -0
- pure_patchright-1.62.3.dist-info/RECORD +142 -0
- pure_patchright-1.62.3.dist-info/WHEEL +4 -0
- pure_patchright-1.62.3.dist-info/entry_points.txt +5 -0
- pure_patchright-1.62.3.dist-info/licenses/LICENSE +202 -0
- pure_patchright-1.62.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const minimumMajorNodeVersion = 20;
|
|
3
|
+
const currentNodeVersion = process.versions.node;
|
|
4
|
+
const major = +currentNodeVersion.split(".")[0];
|
|
5
|
+
if (major < minimumMajorNodeVersion) {
|
|
6
|
+
console.error(
|
|
7
|
+
"You are running Node.js " + currentNodeVersion + `.
|
|
8
|
+
Playwright requires Node.js ${minimumMajorNodeVersion} or higher.
|
|
9
|
+
Please update your version of Node.js.`
|
|
10
|
+
);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
if (process.env.PW_INSTRUMENT_MODULES) {
|
|
14
|
+
const Module = require("module");
|
|
15
|
+
const originalLoad = Module._load;
|
|
16
|
+
const root = { name: "<root>", selfMs: 0, totalMs: 0, childrenMs: 0, children: [] };
|
|
17
|
+
let current = root;
|
|
18
|
+
const stack = [];
|
|
19
|
+
Module._load = function(request, _parent, _isMain) {
|
|
20
|
+
const node = { name: request, selfMs: 0, totalMs: 0, childrenMs: 0, children: [] };
|
|
21
|
+
current.children.push(node);
|
|
22
|
+
stack.push(current);
|
|
23
|
+
current = node;
|
|
24
|
+
const start = performance.now();
|
|
25
|
+
let result;
|
|
26
|
+
try {
|
|
27
|
+
result = originalLoad.apply(this, arguments);
|
|
28
|
+
} catch (e) {
|
|
29
|
+
current = stack.pop();
|
|
30
|
+
current.children.pop();
|
|
31
|
+
throw e;
|
|
32
|
+
}
|
|
33
|
+
const duration = performance.now() - start;
|
|
34
|
+
node.totalMs = duration;
|
|
35
|
+
node.selfMs = Math.max(0, duration - node.childrenMs);
|
|
36
|
+
current = stack.pop();
|
|
37
|
+
current.childrenMs += duration;
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
process.on("exit", () => {
|
|
41
|
+
function printTree(node, prefix, isLast, lines2, depth) {
|
|
42
|
+
if (node.totalMs < 1 && depth > 0)
|
|
43
|
+
return;
|
|
44
|
+
const connector = depth === 0 ? "" : isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
|
|
45
|
+
const time = `${node.totalMs.toFixed(1).padStart(8)}ms`;
|
|
46
|
+
const self = node.children.length ? ` (self: ${node.selfMs.toFixed(1)}ms)` : "";
|
|
47
|
+
lines2.push(`${time} ${prefix}${connector}${node.name}${self}`);
|
|
48
|
+
const childPrefix = prefix + (depth === 0 ? "" : isLast ? " " : "\u2502 ");
|
|
49
|
+
const sorted2 = node.children.slice().sort((a, b) => b.totalMs - a.totalMs);
|
|
50
|
+
for (let i = 0; i < sorted2.length; i++)
|
|
51
|
+
printTree(sorted2[i], childPrefix, i === sorted2.length - 1, lines2, depth + 1);
|
|
52
|
+
}
|
|
53
|
+
let totalModules = 0;
|
|
54
|
+
function count(n) {
|
|
55
|
+
totalModules++;
|
|
56
|
+
n.children.forEach(count);
|
|
57
|
+
}
|
|
58
|
+
root.children.forEach(count);
|
|
59
|
+
const lines = [];
|
|
60
|
+
const sorted = root.children.slice().sort((a, b) => b.totalMs - a.totalMs);
|
|
61
|
+
for (let i = 0; i < sorted.length; i++)
|
|
62
|
+
printTree(sorted[i], "", i === sorted.length - 1, lines, 0);
|
|
63
|
+
const totalMs = root.children.reduce((s, c) => s + c.totalMs, 0);
|
|
64
|
+
process.stderr.write(`
|
|
65
|
+
--- Module load tree: ${totalModules} modules, ${totalMs.toFixed(0)}ms total ---
|
|
66
|
+
` + lines.join("\n") + "\n");
|
|
67
|
+
const flat = /* @__PURE__ */ new Map();
|
|
68
|
+
function gather(n) {
|
|
69
|
+
const existing = flat.get(n.name);
|
|
70
|
+
if (existing) {
|
|
71
|
+
existing.selfMs += n.selfMs;
|
|
72
|
+
existing.totalMs += n.totalMs;
|
|
73
|
+
existing.count++;
|
|
74
|
+
} else {
|
|
75
|
+
flat.set(n.name, { selfMs: n.selfMs, totalMs: n.totalMs, count: 1 });
|
|
76
|
+
}
|
|
77
|
+
n.children.forEach(gather);
|
|
78
|
+
}
|
|
79
|
+
root.children.forEach(gather);
|
|
80
|
+
const top50 = [...flat.entries()].sort((a, b) => b[1].selfMs - a[1].selfMs).slice(0, 50);
|
|
81
|
+
const flatLines = top50.map(
|
|
82
|
+
([mod, { selfMs, totalMs: totalMs2, count: count2 }]) => `${selfMs.toFixed(1).padStart(8)}ms self ${totalMs2.toFixed(1).padStart(8)}ms total (x${String(count2).padStart(3)}) ${mod}`
|
|
83
|
+
);
|
|
84
|
+
process.stderr.write(`
|
|
85
|
+
--- Top 50 modules by self time ---
|
|
86
|
+
` + flatLines.join("\n") + "\n");
|
|
87
|
+
});
|
|
88
|
+
}
|