@bctrl/sdk 1.0.1

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.
Files changed (260) hide show
  1. package/README.md +75 -0
  2. package/dist/agents/browser-use/index.d.ts +1 -0
  3. package/dist/agents/browser-use/index.js +9 -0
  4. package/dist/agents/browser-use/namespace.d.ts +39 -0
  5. package/dist/agents/browser-use/namespace.js +93 -0
  6. package/dist/agents/index.d.ts +2 -0
  7. package/dist/agents/index.js +17 -0
  8. package/dist/agents/stagehand/core.d.ts +93 -0
  9. package/dist/agents/stagehand/core.js +144 -0
  10. package/dist/agents/stagehand/index.d.ts +3 -0
  11. package/dist/agents/stagehand/index.js +24 -0
  12. package/dist/agents/stagehand/namespace.d.ts +51 -0
  13. package/dist/agents/stagehand/namespace.js +65 -0
  14. package/dist/ai-credentials/client.d.ts +12 -0
  15. package/dist/ai-credentials/client.js +70 -0
  16. package/dist/ai-credentials/index.d.ts +1 -0
  17. package/dist/ai-credentials/index.js +1 -0
  18. package/dist/base/event-binding.d.ts +7 -0
  19. package/dist/base/event-binding.js +23 -0
  20. package/dist/base/types.d.ts +109 -0
  21. package/dist/base/types.js +4 -0
  22. package/dist/bctrl.d.ts +37 -0
  23. package/dist/bctrl.js +77 -0
  24. package/dist/browser-extensions/client.d.ts +15 -0
  25. package/dist/browser-extensions/client.js +72 -0
  26. package/dist/browser-extensions/index.d.ts +2 -0
  27. package/dist/browser-extensions/index.js +1 -0
  28. package/dist/browser-profiles/client.d.ts +11 -0
  29. package/dist/browser-profiles/client.js +63 -0
  30. package/dist/browser-profiles/index.d.ts +1 -0
  31. package/dist/browser-profiles/index.js +1 -0
  32. package/dist/captcha/index.d.ts +1 -0
  33. package/dist/captcha/index.js +1 -0
  34. package/dist/captcha/namespace.d.ts +34 -0
  35. package/dist/captcha/namespace.js +41 -0
  36. package/dist/client/index.d.ts +1 -0
  37. package/dist/client/index.js +1 -0
  38. package/dist/client/rpc.d.ts +83 -0
  39. package/dist/client/rpc.js +354 -0
  40. package/dist/config.d.ts +5 -0
  41. package/dist/config.js +28 -0
  42. package/dist/constants/browser.d.ts +2 -0
  43. package/dist/constants/browser.js +1 -0
  44. package/dist/contracts/agent-tools.d.ts +45 -0
  45. package/dist/contracts/agent-tools.js +31 -0
  46. package/dist/contracts/automation.d.ts +265 -0
  47. package/dist/contracts/automation.js +109 -0
  48. package/dist/contracts/browser-management.d.ts +179 -0
  49. package/dist/contracts/browser-management.js +95 -0
  50. package/dist/contracts/browser-use.d.ts +136 -0
  51. package/dist/contracts/browser-use.js +93 -0
  52. package/dist/contracts/captcha.d.ts +114 -0
  53. package/dist/contracts/captcha.js +40 -0
  54. package/dist/contracts/desktop.d.ts +223 -0
  55. package/dist/contracts/desktop.js +121 -0
  56. package/dist/contracts/drivers/playwright.d.ts +2008 -0
  57. package/dist/contracts/drivers/playwright.js +2033 -0
  58. package/dist/contracts/drivers/puppeteer.d.ts +1221 -0
  59. package/dist/contracts/drivers/puppeteer.js +941 -0
  60. package/dist/contracts/drivers/selenium.d.ts +156 -0
  61. package/dist/contracts/drivers/selenium.js +61 -0
  62. package/dist/contracts/drivers/stagehand.d.ts +155 -0
  63. package/dist/contracts/drivers/stagehand.js +7 -0
  64. package/dist/contracts/extensions.d.ts +13 -0
  65. package/dist/contracts/extensions.js +9 -0
  66. package/dist/contracts/index.d.ts +13 -0
  67. package/dist/contracts/index.js +13 -0
  68. package/dist/contracts/public-api.d.ts +360 -0
  69. package/dist/contracts/public-api.js +17 -0
  70. package/dist/contracts/runtime.d.ts +81 -0
  71. package/dist/contracts/runtime.js +16 -0
  72. package/dist/contracts/stagehand.d.ts +253 -0
  73. package/dist/contracts/stagehand.js +145 -0
  74. package/dist/contracts/storage.d.ts +51 -0
  75. package/dist/contracts/storage.js +56 -0
  76. package/dist/contracts/vault.d.ts +119 -0
  77. package/dist/contracts/vault.js +112 -0
  78. package/dist/contracts/version.d.ts +3 -0
  79. package/dist/contracts/version.js +16 -0
  80. package/dist/desktop.d.ts +2 -0
  81. package/dist/desktop.js +3 -0
  82. package/dist/drivers/desktop/index.d.ts +65 -0
  83. package/dist/drivers/desktop/index.js +68 -0
  84. package/dist/drivers/desktop/session.d.ts +313 -0
  85. package/dist/drivers/desktop/session.js +432 -0
  86. package/dist/drivers/playwright/event-emitter.d.ts +160 -0
  87. package/dist/drivers/playwright/event-emitter.js +297 -0
  88. package/dist/drivers/playwright/generated/api-request-context.d.ts +137 -0
  89. package/dist/drivers/playwright/generated/api-request-context.js +154 -0
  90. package/dist/drivers/playwright/generated/api-response.d.ts +119 -0
  91. package/dist/drivers/playwright/generated/api-response.js +123 -0
  92. package/dist/drivers/playwright/generated/browser-context.d.ts +284 -0
  93. package/dist/drivers/playwright/generated/browser-context.js +458 -0
  94. package/dist/drivers/playwright/generated/browser.d.ts +120 -0
  95. package/dist/drivers/playwright/generated/browser.js +151 -0
  96. package/dist/drivers/playwright/generated/clock.d.ts +80 -0
  97. package/dist/drivers/playwright/generated/clock.js +94 -0
  98. package/dist/drivers/playwright/generated/console-message.d.ts +94 -0
  99. package/dist/drivers/playwright/generated/console-message.js +89 -0
  100. package/dist/drivers/playwright/generated/coverage.d.ts +57 -0
  101. package/dist/drivers/playwright/generated/coverage.js +66 -0
  102. package/dist/drivers/playwright/generated/dialog.d.ts +79 -0
  103. package/dist/drivers/playwright/generated/dialog.js +80 -0
  104. package/dist/drivers/playwright/generated/element-handle.d.ts +399 -0
  105. package/dist/drivers/playwright/generated/element-handle.js +501 -0
  106. package/dist/drivers/playwright/generated/frame-locator.d.ts +34 -0
  107. package/dist/drivers/playwright/generated/frame-locator.js +63 -0
  108. package/dist/drivers/playwright/generated/frame.d.ts +557 -0
  109. package/dist/drivers/playwright/generated/frame.js +634 -0
  110. package/dist/drivers/playwright/generated/js-handle.d.ts +72 -0
  111. package/dist/drivers/playwright/generated/js-handle.js +92 -0
  112. package/dist/drivers/playwright/generated/keyboard.d.ts +103 -0
  113. package/dist/drivers/playwright/generated/keyboard.js +113 -0
  114. package/dist/drivers/playwright/generated/locator.d.ts +795 -0
  115. package/dist/drivers/playwright/generated/locator.js +974 -0
  116. package/dist/drivers/playwright/generated/mouse.d.ts +97 -0
  117. package/dist/drivers/playwright/generated/mouse.js +109 -0
  118. package/dist/drivers/playwright/generated/page.d.ts +762 -0
  119. package/dist/drivers/playwright/generated/page.js +988 -0
  120. package/dist/drivers/playwright/generated/touchscreen.d.ts +34 -0
  121. package/dist/drivers/playwright/generated/touchscreen.js +37 -0
  122. package/dist/drivers/playwright/generated/tracing.d.ts +78 -0
  123. package/dist/drivers/playwright/generated/tracing.js +80 -0
  124. package/dist/drivers/playwright/generated/worker.d.ts +53 -0
  125. package/dist/drivers/playwright/generated/worker.js +59 -0
  126. package/dist/drivers/playwright/index.d.ts +19 -0
  127. package/dist/drivers/playwright/index.js +20 -0
  128. package/dist/drivers/playwright/remote-base.d.ts +62 -0
  129. package/dist/drivers/playwright/remote-base.js +86 -0
  130. package/dist/drivers/playwright/types.d.ts +148 -0
  131. package/dist/drivers/playwright/types.js +8 -0
  132. package/dist/drivers/puppeteer/errors.d.ts +50 -0
  133. package/dist/drivers/puppeteer/errors.js +71 -0
  134. package/dist/drivers/puppeteer/event-emitter.d.ts +145 -0
  135. package/dist/drivers/puppeteer/event-emitter.js +259 -0
  136. package/dist/drivers/puppeteer/generated/accessibility.d.ts +77 -0
  137. package/dist/drivers/puppeteer/generated/accessibility.js +74 -0
  138. package/dist/drivers/puppeteer/generated/browser-context.d.ts +116 -0
  139. package/dist/drivers/puppeteer/generated/browser-context.js +168 -0
  140. package/dist/drivers/puppeteer/generated/browser.d.ts +169 -0
  141. package/dist/drivers/puppeteer/generated/browser.js +246 -0
  142. package/dist/drivers/puppeteer/generated/console-message.d.ts +54 -0
  143. package/dist/drivers/puppeteer/generated/console-message.js +69 -0
  144. package/dist/drivers/puppeteer/generated/coverage.d.ts +49 -0
  145. package/dist/drivers/puppeteer/generated/coverage.js +57 -0
  146. package/dist/drivers/puppeteer/generated/dialog.d.ts +46 -0
  147. package/dist/drivers/puppeteer/generated/dialog.js +60 -0
  148. package/dist/drivers/puppeteer/generated/element-handle.d.ts +261 -0
  149. package/dist/drivers/puppeteer/generated/element-handle.js +341 -0
  150. package/dist/drivers/puppeteer/generated/file-chooser.d.ts +34 -0
  151. package/dist/drivers/puppeteer/generated/file-chooser.js +43 -0
  152. package/dist/drivers/puppeteer/generated/frame.d.ts +221 -0
  153. package/dist/drivers/puppeteer/generated/frame.js +302 -0
  154. package/dist/drivers/puppeteer/generated/http-request.d.ts +195 -0
  155. package/dist/drivers/puppeteer/generated/http-request.js +243 -0
  156. package/dist/drivers/puppeteer/generated/http-response.d.ts +142 -0
  157. package/dist/drivers/puppeteer/generated/http-response.js +169 -0
  158. package/dist/drivers/puppeteer/generated/js-handle.d.ts +104 -0
  159. package/dist/drivers/puppeteer/generated/js-handle.js +125 -0
  160. package/dist/drivers/puppeteer/generated/keyboard.d.ts +79 -0
  161. package/dist/drivers/puppeteer/generated/keyboard.js +89 -0
  162. package/dist/drivers/puppeteer/generated/locator.d.ts +141 -0
  163. package/dist/drivers/puppeteer/generated/locator.js +164 -0
  164. package/dist/drivers/puppeteer/generated/mouse.d.ts +74 -0
  165. package/dist/drivers/puppeteer/generated/mouse.js +94 -0
  166. package/dist/drivers/puppeteer/generated/page.d.ts +604 -0
  167. package/dist/drivers/puppeteer/generated/page.js +776 -0
  168. package/dist/drivers/puppeteer/generated/target.d.ts +105 -0
  169. package/dist/drivers/puppeteer/generated/target.js +123 -0
  170. package/dist/drivers/puppeteer/generated/touchscreen.d.ts +87 -0
  171. package/dist/drivers/puppeteer/generated/touchscreen.js +103 -0
  172. package/dist/drivers/puppeteer/generated/tracing.d.ts +38 -0
  173. package/dist/drivers/puppeteer/generated/tracing.js +43 -0
  174. package/dist/drivers/puppeteer/generated/web-worker.d.ts +63 -0
  175. package/dist/drivers/puppeteer/generated/web-worker.js +73 -0
  176. package/dist/drivers/puppeteer/index.d.ts +21 -0
  177. package/dist/drivers/puppeteer/index.js +23 -0
  178. package/dist/drivers/puppeteer/remote-base.d.ts +57 -0
  179. package/dist/drivers/puppeteer/remote-base.js +79 -0
  180. package/dist/drivers/puppeteer/types.d.ts +178 -0
  181. package/dist/drivers/puppeteer/types.js +8 -0
  182. package/dist/drivers/selenium/driver.d.ts +28 -0
  183. package/dist/drivers/selenium/driver.js +169 -0
  184. package/dist/drivers/selenium/element.d.ts +34 -0
  185. package/dist/drivers/selenium/element.js +73 -0
  186. package/dist/drivers/selenium/index.d.ts +3 -0
  187. package/dist/drivers/selenium/index.js +5 -0
  188. package/dist/drivers/selenium/types.d.ts +2 -0
  189. package/dist/drivers/selenium/types.js +12 -0
  190. package/dist/drivers/stagehand/generated/context.d.ts +127 -0
  191. package/dist/drivers/stagehand/generated/context.js +153 -0
  192. package/dist/drivers/stagehand/generated/locator.d.ts +324 -0
  193. package/dist/drivers/stagehand/generated/locator.js +368 -0
  194. package/dist/drivers/stagehand/generated/page.d.ts +377 -0
  195. package/dist/drivers/stagehand/generated/page.js +439 -0
  196. package/dist/drivers/stagehand/generated/response.d.ts +197 -0
  197. package/dist/drivers/stagehand/generated/response.js +232 -0
  198. package/dist/drivers/stagehand/index.d.ts +5 -0
  199. package/dist/drivers/stagehand/index.js +8 -0
  200. package/dist/drivers/stagehand/types.d.ts +1 -0
  201. package/dist/drivers/stagehand/types.js +7 -0
  202. package/dist/errors.d.ts +47 -0
  203. package/dist/errors.js +157 -0
  204. package/dist/extensions/client.d.ts +47 -0
  205. package/dist/extensions/client.js +154 -0
  206. package/dist/extensions/index.d.ts +1 -0
  207. package/dist/extensions/index.js +1 -0
  208. package/dist/index.d.ts +12 -0
  209. package/dist/index.js +23 -0
  210. package/dist/internal/dev-client.d.ts +5 -0
  211. package/dist/internal/dev-client.js +9 -0
  212. package/dist/internal/rpc-targets.d.ts +17 -0
  213. package/dist/internal/rpc-targets.js +58 -0
  214. package/dist/internal/serialization.d.ts +32 -0
  215. package/dist/internal/serialization.js +42 -0
  216. package/dist/internal/transport.d.ts +24 -0
  217. package/dist/internal/transport.js +29 -0
  218. package/dist/playwright.d.ts +1 -0
  219. package/dist/playwright.js +2 -0
  220. package/dist/puppeteer.d.ts +1 -0
  221. package/dist/puppeteer.js +2 -0
  222. package/dist/selenium.d.ts +1 -0
  223. package/dist/selenium.js +2 -0
  224. package/dist/stagehand.d.ts +1 -0
  225. package/dist/stagehand.js +2 -0
  226. package/dist/storage/client.d.ts +151 -0
  227. package/dist/storage/client.js +329 -0
  228. package/dist/storage/index.d.ts +2 -0
  229. package/dist/storage/index.js +4 -0
  230. package/dist/telemetry.d.ts +18 -0
  231. package/dist/telemetry.js +93 -0
  232. package/dist/updates/client.d.ts +8 -0
  233. package/dist/updates/client.js +128 -0
  234. package/dist/updates/index.d.ts +1 -0
  235. package/dist/updates/index.js +1 -0
  236. package/dist/utils/http.d.ts +39 -0
  237. package/dist/utils/http.js +88 -0
  238. package/dist/utils/index.d.ts +4 -0
  239. package/dist/utils/index.js +4 -0
  240. package/dist/utils/logger.d.ts +27 -0
  241. package/dist/utils/logger.js +74 -0
  242. package/dist/utils/schema.d.ts +17 -0
  243. package/dist/utils/schema.js +31 -0
  244. package/dist/utils/url.d.ts +5 -0
  245. package/dist/utils/url.js +7 -0
  246. package/dist/vault/client.d.ts +43 -0
  247. package/dist/vault/client.js +123 -0
  248. package/dist/vault/index.d.ts +1 -0
  249. package/dist/vault/index.js +1 -0
  250. package/dist/version.d.ts +1 -0
  251. package/dist/version.js +4 -0
  252. package/dist/workspaces/browser-runtime.d.ts +251 -0
  253. package/dist/workspaces/browser-runtime.js +1025 -0
  254. package/dist/workspaces/client.d.ts +48 -0
  255. package/dist/workspaces/client.js +222 -0
  256. package/dist/workspaces/index.d.ts +2 -0
  257. package/dist/workspaces/index.js +2 -0
  258. package/dist/workspaces/runtime-event-pump.d.ts +65 -0
  259. package/dist/workspaces/runtime-event-pump.js +716 -0
  260. package/package.json +56 -0
@@ -0,0 +1,79 @@
1
+ /**
2
+ * AUTO-GENERATED FILE - DO NOT EDIT
3
+ *
4
+ * Generated from: packages/automation-spec/src/drivers/playwright/methods/
5
+ * Run `pnpm generate:playwright` to regenerate.
6
+ */
7
+ import type { SimpleRpcSender } from '../../../internal/transport.js';
8
+ import type { PlaywrightDialogType } from '../types.js';
9
+ import type { RemotePlaywrightPage } from './page.js';
10
+ /**
11
+ * Serialized Dialog data received over RPC.
12
+ */
13
+ export interface SerializedDialog {
14
+ /** Dialog ID for RPC calls */
15
+ id: string;
16
+ /** Dialog type */
17
+ type: PlaywrightDialogType;
18
+ /** Message displayed in the dialog */
19
+ message: string;
20
+ /** Default value for prompt dialogs */
21
+ defaultValue: string;
22
+ /** Page ID or null */
23
+ pageId: string | null;
24
+ }
25
+ /**
26
+ * RemotePlaywrightDialog - Remote Playwright Dialog API over RPC.
27
+ *
28
+ * @see https://playwright.dev/docs/api/class-dialog
29
+ */
30
+ export declare class RemotePlaywrightDialog {
31
+ private sendRpc;
32
+ private readonly _id;
33
+ private readonly _type;
34
+ private readonly _message;
35
+ private readonly _defaultValue;
36
+ constructor(sendRpc: SimpleRpcSender, data: SerializedDialog, createPage: (id: string) => RemotePlaywrightPage);
37
+ private readonly _page;
38
+ /**
39
+ * Accepts the dialog.
40
+ * @param promptText - Text to enter in a prompt dialog.
41
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-accept
42
+ */
43
+ accept(promptText?: string): Promise<void>;
44
+ /**
45
+ * Dismisses the dialog.
46
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-dismiss
47
+ */
48
+ dismiss(): Promise<void>;
49
+ /**
50
+ * Returns the default prompt value if the dialog is a prompt.
51
+ *
52
+ * @remarks
53
+ * Returns empty string for other dialog types.
54
+ *
55
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-default-value
56
+ */
57
+ defaultValue(): string;
58
+ /**
59
+ * Returns the message displayed in the dialog.
60
+ *
61
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-message
62
+ */
63
+ message(): string;
64
+ /**
65
+ * Returns the page that initiated the dialog, or null if not available.
66
+ *
67
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-page
68
+ */
69
+ page(): RemotePlaywrightPage | null;
70
+ /**
71
+ * Returns the type of the dialog.
72
+ *
73
+ * @remarks
74
+ * One of 'alert', 'beforeunload', 'confirm', or 'prompt'.
75
+ *
76
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-type
77
+ */
78
+ type(): PlaywrightDialogType;
79
+ }
@@ -0,0 +1,80 @@
1
+ /**
2
+ * AUTO-GENERATED FILE - DO NOT EDIT
3
+ *
4
+ * Generated from: packages/automation-spec/src/drivers/playwright/methods/
5
+ * Run `pnpm generate:playwright` to regenerate.
6
+ */
7
+ /**
8
+ * RemotePlaywrightDialog - Remote Playwright Dialog API over RPC.
9
+ *
10
+ * @see https://playwright.dev/docs/api/class-dialog
11
+ */
12
+ export class RemotePlaywrightDialog {
13
+ sendRpc;
14
+ _id;
15
+ _type;
16
+ _message;
17
+ _defaultValue;
18
+ constructor(sendRpc, data, createPage) {
19
+ this.sendRpc = sendRpc;
20
+ this._id = data.id;
21
+ this._type = data.type;
22
+ this._message = data.message;
23
+ this._defaultValue = data.defaultValue;
24
+ this._page = data.pageId ? createPage(data.pageId) : null;
25
+ }
26
+ _page;
27
+ /**
28
+ * Accepts the dialog.
29
+ * @param promptText - Text to enter in a prompt dialog.
30
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-accept
31
+ */
32
+ async accept(promptText) {
33
+ await this.sendRpc('accept', [this._id, promptText]);
34
+ }
35
+ /**
36
+ * Dismisses the dialog.
37
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-dismiss
38
+ */
39
+ async dismiss() {
40
+ await this.sendRpc('dismiss', [this._id]);
41
+ }
42
+ /**
43
+ * Returns the default prompt value if the dialog is a prompt.
44
+ *
45
+ * @remarks
46
+ * Returns empty string for other dialog types.
47
+ *
48
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-default-value
49
+ */
50
+ defaultValue() {
51
+ return this._defaultValue;
52
+ }
53
+ /**
54
+ * Returns the message displayed in the dialog.
55
+ *
56
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-message
57
+ */
58
+ message() {
59
+ return this._message;
60
+ }
61
+ /**
62
+ * Returns the page that initiated the dialog, or null if not available.
63
+ *
64
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-page
65
+ */
66
+ page() {
67
+ return this._page;
68
+ }
69
+ /**
70
+ * Returns the type of the dialog.
71
+ *
72
+ * @remarks
73
+ * One of 'alert', 'beforeunload', 'confirm', or 'prompt'.
74
+ *
75
+ * @see https://playwright.dev/docs/api/class-dialog#dialog-type
76
+ */
77
+ type() {
78
+ return this._type;
79
+ }
80
+ }
@@ -0,0 +1,399 @@
1
+ /**
2
+ * AUTO-GENERATED FILE - DO NOT EDIT
3
+ *
4
+ * Generated from: packages/automation-spec/src/drivers/playwright/methods/
5
+ * Run `pnpm generate:playwright` to regenerate.
6
+ */
7
+ import type { SimpleRpcSender } from '../../../internal/transport.js';
8
+ import { RemoteBase } from '../remote-base.js';
9
+ import type { PlaywrightBoundingBox, PlaywrightCheckOptions, PlaywrightClickOptions, PlaywrightElementState, PlaywrightEventInit, PlaywrightFilePayload, PlaywrightFillOptions, PlaywrightHoverOptions, PlaywrightPressOptions, PlaywrightSelectOption, PlaywrightSelectOptionOptions, PlaywrightSetInputFilesOptions, PlaywrightTapOptions, PlaywrightTimeoutOptions, PlaywrightTypeOptions, PlaywrightWaitForSelectorOptions } from '../types.js';
10
+ import type { RemotePlaywrightFrame } from './frame.js';
11
+ import type { RemotePlaywrightJSHandle } from './js-handle.js';
12
+ /**
13
+ * RemotePlaywrightElementHandle - Remote Playwright ElementHandle API over RPC.
14
+ *
15
+ * @see https://playwright.dev/docs/api/class-elementhandle
16
+ */
17
+ export declare class RemotePlaywrightElementHandle extends RemoteBase {
18
+ private createElementHandle;
19
+ private createFrame;
20
+ private createJSHandle;
21
+ constructor(id: string, sendRpc: SimpleRpcSender, createElementHandle: (handleId: string) => RemotePlaywrightElementHandle, createFrame: (frameId: string) => RemotePlaywrightFrame, createJSHandle: (handleId: string) => RemotePlaywrightJSHandle);
22
+ /**
23
+ * Return this handle as an ElementHandle.
24
+ * Since this is already an ElementHandle, returns itself.
25
+ * @see https://playwright.dev/docs/api/class-jshandle#js-handle-as-element
26
+ */
27
+ asElement(): RemotePlaywrightElementHandle | null;
28
+ /**
29
+ * Click the element.
30
+ *
31
+ * @remarks
32
+ * This method clicks the element by performing actionability checks, scrolling into view, and simulating a mouse click. Discouraged in favor of locator.click().
33
+ *
34
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-click
35
+ */
36
+ click(options?: PlaywrightClickOptions): Promise<void>;
37
+ /**
38
+ * Double-click the element.
39
+ *
40
+ * @remarks
41
+ * Discouraged in favor of locator.dblclick().
42
+ *
43
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick
44
+ */
45
+ dblclick(options?: PlaywrightClickOptions): Promise<void>;
46
+ /**
47
+ * Fill an input, textarea, or contenteditable element with the specified value.
48
+ *
49
+ * @remarks
50
+ * This method waits for actionability checks, focuses the element, fills it, and triggers an input event. Pass empty string to clear. Discouraged in favor of locator.fill().
51
+ *
52
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-fill
53
+ */
54
+ fill(value: string, options?: PlaywrightFillOptions): Promise<void>;
55
+ /**
56
+ * Focus the element and type text into it character by character.
57
+ *
58
+ * @remarks
59
+ * Deprecated: In most cases use locator.fill() instead. Only use this for special keyboard handling. For special keys use press().
60
+ *
61
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-type
62
+ */
63
+ type(text: string, options?: PlaywrightTypeOptions): Promise<void>;
64
+ /**
65
+ * Focus the element and press a key or key combination.
66
+ *
67
+ * @remarks
68
+ * Key can be a single character or a special key like "Enter", "Control+a", "Shift+ArrowDown". Discouraged in favor of locator.press().
69
+ *
70
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-press
71
+ */
72
+ press(key: string, options?: PlaywrightPressOptions): Promise<void>;
73
+ /**
74
+ * Hover over the element.
75
+ *
76
+ * @remarks
77
+ * This method hovers over the element by performing actionability checks, scrolling into view, and simulating mouse hover. Discouraged in favor of locator.hover().
78
+ *
79
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-hover
80
+ */
81
+ hover(options?: PlaywrightHoverOptions): Promise<void>;
82
+ /**
83
+ * Focus the element.
84
+ *
85
+ * @remarks
86
+ * Discouraged in favor of locator.focus().
87
+ *
88
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-focus
89
+ */
90
+ focus(): Promise<void>;
91
+ /**
92
+ * Tap the element (for touch devices).
93
+ *
94
+ * @remarks
95
+ * This method taps the element by performing actionability checks, scrolling into view, centering, and dispatching touchstart/touchend events. Discouraged in favor of locator.tap().
96
+ *
97
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-tap
98
+ */
99
+ tap(options?: PlaywrightTapOptions): Promise<void>;
100
+ /**
101
+ * Check a checkbox or radio element.
102
+ *
103
+ * @remarks
104
+ * If the element is already checked, this method returns immediately. Discouraged in favor of locator.check().
105
+ *
106
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-check
107
+ */
108
+ check(options?: PlaywrightCheckOptions): Promise<void>;
109
+ /**
110
+ * Uncheck a checkbox element.
111
+ *
112
+ * @remarks
113
+ * If the element is already unchecked, this method returns immediately. Discouraged in favor of locator.uncheck().
114
+ *
115
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
116
+ */
117
+ uncheck(options?: PlaywrightCheckOptions): Promise<void>;
118
+ /**
119
+ * Check or uncheck a checkbox or radio element.
120
+ *
121
+ * @remarks
122
+ * Discouraged in favor of locator.setChecked().
123
+ *
124
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked
125
+ */
126
+ setChecked(checked: boolean, options?: PlaywrightCheckOptions): Promise<void>;
127
+ /**
128
+ * Select one or more options in a <select> element.
129
+ * @param values - Options to select. Can be value, label, or option object.
130
+ * @returns An array of selected option values.
131
+ *
132
+ * @remarks
133
+ * Discouraged in favor of locator.selectOption().
134
+ *
135
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-select-option
136
+ */
137
+ selectOption(values: string | string[] | PlaywrightSelectOption | PlaywrightSelectOption[], options?: PlaywrightSelectOptionOptions): Promise<string[]>;
138
+ /**
139
+ * Set the files for a file input element.
140
+ * @param files - File paths or file payloads to upload.
141
+ *
142
+ * @remarks
143
+ * Sets the value of the file input to these file paths or files. If some paths are relative, they are resolved relative to the current working directory. Clears selected files if empty array is passed. Discouraged in favor of locator.setInputFiles().
144
+ *
145
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-set-input-files
146
+ */
147
+ setInputFiles(files: string | string[] | PlaywrightFilePayload | PlaywrightFilePayload[], options?: PlaywrightSetInputFilesOptions): Promise<void>;
148
+ /**
149
+ * Scroll the element into view if not already visible.
150
+ *
151
+ * @remarks
152
+ * If the element is detached from DOM, throws an error. Discouraged in favor of locator.scrollIntoViewIfNeeded().
153
+ *
154
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-scroll-into-view-if-needed
155
+ */
156
+ scrollIntoViewIfNeeded(options?: PlaywrightTimeoutOptions): Promise<void>;
157
+ /**
158
+ * Dispatch a DOM event on the element.
159
+ * @param type - DOM event type, e.g., "click".
160
+ * @param eventInit - Event-specific initialization properties.
161
+ *
162
+ * @remarks
163
+ * The event is composed, cancelable and bubbles by default. Regardless of visibility, this will dispatch the event. Discouraged in favor of locator.dispatchEvent().
164
+ *
165
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event
166
+ */
167
+ dispatchEvent(type: string, eventInit?: PlaywrightEventInit): Promise<void>;
168
+ /**
169
+ * Get the innerHTML of the element.
170
+ *
171
+ * @remarks
172
+ * Discouraged in favor of locator.innerHTML().
173
+ *
174
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-inner-html
175
+ */
176
+ innerHTML(): Promise<string>;
177
+ /**
178
+ * Get the innerText of the element.
179
+ *
180
+ * @remarks
181
+ * Discouraged in favor of locator.innerText().
182
+ *
183
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-inner-text
184
+ */
185
+ innerText(): Promise<string>;
186
+ /**
187
+ * Get the textContent of the element.
188
+ *
189
+ * @remarks
190
+ * Discouraged in favor of locator.textContent().
191
+ *
192
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-text-content
193
+ */
194
+ textContent(): Promise<string | null>;
195
+ /**
196
+ * Get an attribute value of the element.
197
+ * @param name - Attribute name to get.
198
+ *
199
+ * @remarks
200
+ * Discouraged in favor of locator.getAttribute().
201
+ *
202
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-get-attribute
203
+ */
204
+ getAttribute(name: string): Promise<string | null>;
205
+ /**
206
+ * Get the input value for input, textarea, or select elements.
207
+ *
208
+ * @remarks
209
+ * Throws for non-input elements. Discouraged in favor of locator.inputValue().
210
+ *
211
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-input-value
212
+ */
213
+ inputValue(options?: PlaywrightTimeoutOptions): Promise<string>;
214
+ /**
215
+ * Check if the element is visible.
216
+ *
217
+ * @remarks
218
+ * Returns true if element is visible. Non-attached elements return false. Discouraged in favor of locator.isVisible().
219
+ *
220
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-is-visible
221
+ */
222
+ isVisible(): Promise<boolean>;
223
+ /**
224
+ * Check if the element is hidden.
225
+ *
226
+ * @remarks
227
+ * Returns true if element is hidden. Non-attached elements return true. Discouraged in favor of locator.isHidden().
228
+ *
229
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-is-hidden
230
+ */
231
+ isHidden(): Promise<boolean>;
232
+ /**
233
+ * Check if the element is enabled.
234
+ *
235
+ * @remarks
236
+ * Discouraged in favor of locator.isEnabled().
237
+ *
238
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-is-enabled
239
+ */
240
+ isEnabled(): Promise<boolean>;
241
+ /**
242
+ * Check if the element is disabled.
243
+ *
244
+ * @remarks
245
+ * Discouraged in favor of locator.isDisabled().
246
+ *
247
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-is-disabled
248
+ */
249
+ isDisabled(): Promise<boolean>;
250
+ /**
251
+ * Check if a checkbox or radio is checked.
252
+ *
253
+ * @remarks
254
+ * Throws if element is not a checkbox or radio. Discouraged in favor of locator.isChecked().
255
+ *
256
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-is-checked
257
+ */
258
+ isChecked(): Promise<boolean>;
259
+ /**
260
+ * Check if the element is editable.
261
+ *
262
+ * @remarks
263
+ * Discouraged in favor of locator.isEditable().
264
+ *
265
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-is-editable
266
+ */
267
+ isEditable(): Promise<boolean>;
268
+ /**
269
+ * Get the bounding box of the element.
270
+ * @returns Bounding box with x, y, width, height, or null if element is not visible.
271
+ *
272
+ * @remarks
273
+ * Discouraged in favor of locator.boundingBox().
274
+ *
275
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-bounding-box
276
+ */
277
+ boundingBox(): Promise<PlaywrightBoundingBox | null>;
278
+ /**
279
+ * Get the content frame for iframe elements.
280
+ * @returns The frame content, or null if not an iframe.
281
+ *
282
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-content-frame
283
+ */
284
+ contentFrame(): Promise<RemotePlaywrightFrame | null>;
285
+ /**
286
+ * Get the frame that owns this element.
287
+ * @returns The owner frame, or null if element is detached.
288
+ *
289
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-owner-frame
290
+ */
291
+ ownerFrame(): Promise<RemotePlaywrightFrame | null>;
292
+ /**
293
+ * Evaluate a function in the context of the element.
294
+ * @param pageFunction - Function or string to evaluate in the page context.
295
+ * @param arg - Argument to pass to the function.
296
+ *
297
+ * @remarks
298
+ * The element is passed as the first argument to the function. If the function returns a Promise, it will be awaited.
299
+ *
300
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate
301
+ */
302
+ evaluate<R = unknown, Arg = unknown>(pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: unknown): Promise<R>;
303
+ /**
304
+ * Evaluate a function and return a JSHandle to the result.
305
+ * @param pageFunction - Function or string to evaluate in the page context.
306
+ * @param arg - Argument to pass to the function.
307
+ *
308
+ * @remarks
309
+ * The element is passed as the first argument. Note: Returns serialized handle reference. Full JSHandle support not yet available.
310
+ *
311
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle
312
+ */
313
+ evaluateHandle<R = unknown, Arg = unknown>(pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: unknown): Promise<unknown>;
314
+ /**
315
+ * Query for a child element matching the selector.
316
+ * @returns The matching element or null if not found.
317
+ *
318
+ * @remarks
319
+ * Discouraged in favor of locator-based locator.locator().
320
+ *
321
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-query-selector
322
+ */
323
+ $(selector: string): Promise<RemotePlaywrightElementHandle | null>;
324
+ /**
325
+ * Query for all child elements matching the selector.
326
+ * @returns An array of matching elements.
327
+ *
328
+ * @remarks
329
+ * Discouraged in favor of locator-based locator.locator().
330
+ *
331
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-query-selector-all
332
+ */
333
+ $$(selector: string): Promise<RemotePlaywrightElementHandle[]>;
334
+ /**
335
+ * Evaluate a function on a child element matching the selector.
336
+ *
337
+ * @remarks
338
+ * Throws if no element matches. Discouraged in favor of locator.evaluate().
339
+ *
340
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector
341
+ */
342
+ $eval<R = unknown, Arg = unknown>(selector: string, pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: unknown): Promise<R>;
343
+ /**
344
+ * Evaluate a function on all child elements matching the selector.
345
+ *
346
+ * @remarks
347
+ * Discouraged in favor of locator.evaluateAll().
348
+ *
349
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all
350
+ */
351
+ $$eval<R = unknown, Arg = unknown>(selector: string, pageFunction: string | ((elements: Element[], arg: Arg) => R | Promise<R>), arg?: unknown): Promise<R>;
352
+ /**
353
+ * Wait for the element to reach a specific state.
354
+ * @param state - State to wait for: "visible", "hidden", "stable", "enabled", or "disabled".
355
+ *
356
+ * @remarks
357
+ * Discouraged in favor of web-first assertions.
358
+ *
359
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state
360
+ */
361
+ waitForElementState(state: PlaywrightElementState, options?: PlaywrightTimeoutOptions): Promise<void>;
362
+ /**
363
+ * Wait for a child element matching the selector.
364
+ * @returns The matching element, or null if waiting for hidden/detached.
365
+ *
366
+ * @remarks
367
+ * Discouraged in favor of locator-based assertions.
368
+ *
369
+ * @see https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector
370
+ */
371
+ waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<RemotePlaywrightElementHandle | null>;
372
+ /**
373
+ * Dispose of the handle, releasing it from the browser.
374
+ *
375
+ * @remarks
376
+ * After disposal, any method calls will throw. The SDK sets the disposed flag before the RPC call to prevent race conditions.
377
+ *
378
+ * @see https://playwright.dev/docs/api/class-jshandle#js-handle-dispose
379
+ */
380
+ dispose(): Promise<void>;
381
+ /**
382
+ * Get a JSHandle for a property of this element.
383
+ *
384
+ * @remarks
385
+ * Note: Returns serialized handle reference. Full JSHandle support not yet available.
386
+ *
387
+ * @see https://playwright.dev/docs/api/class-jshandle#js-handle-get-property
388
+ */
389
+ getProperty(propertyName: string): Promise<unknown>;
390
+ /**
391
+ * Get the JSON value of the element.
392
+ *
393
+ * @remarks
394
+ * Throws if the object cannot be serialized to JSON (e.g., DOM nodes).
395
+ *
396
+ * @see https://playwright.dev/docs/api/class-jshandle#js-handle-json-value
397
+ */
398
+ jsonValue<T = unknown>(): Promise<T>;
399
+ }