@bctrl/sdk 1.0.1 → 1.0.3

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 (277) hide show
  1. package/README.md +28 -29
  2. package/dist/bctrl.d.ts +22 -36
  3. package/dist/bctrl.js +40 -75
  4. package/dist/errors.d.ts +49 -43
  5. package/dist/errors.js +83 -120
  6. package/dist/files.d.ts +31 -0
  7. package/dist/files.js +97 -0
  8. package/dist/http.d.ts +18 -0
  9. package/dist/http.js +135 -0
  10. package/dist/index.d.ts +9 -12
  11. package/dist/index.js +7 -23
  12. package/dist/invocations.d.ts +86 -0
  13. package/dist/invocations.js +159 -0
  14. package/dist/pagination.d.ts +2 -0
  15. package/dist/pagination.js +13 -0
  16. package/dist/runs.d.ts +40 -0
  17. package/dist/runs.js +105 -0
  18. package/dist/runtimes.d.ts +69 -0
  19. package/dist/runtimes.js +202 -0
  20. package/dist/spaces.d.ts +40 -0
  21. package/dist/spaces.js +96 -0
  22. package/dist/types.d.ts +413 -0
  23. package/dist/types.js +1 -0
  24. package/dist/utils.d.ts +4 -0
  25. package/dist/utils.js +27 -0
  26. package/dist/version.js +2 -2
  27. package/package.json +4 -21
  28. package/dist/agents/browser-use/index.d.ts +0 -1
  29. package/dist/agents/browser-use/index.js +0 -9
  30. package/dist/agents/browser-use/namespace.d.ts +0 -39
  31. package/dist/agents/browser-use/namespace.js +0 -93
  32. package/dist/agents/index.d.ts +0 -2
  33. package/dist/agents/index.js +0 -17
  34. package/dist/agents/stagehand/core.d.ts +0 -93
  35. package/dist/agents/stagehand/core.js +0 -144
  36. package/dist/agents/stagehand/index.d.ts +0 -3
  37. package/dist/agents/stagehand/index.js +0 -24
  38. package/dist/agents/stagehand/namespace.d.ts +0 -51
  39. package/dist/agents/stagehand/namespace.js +0 -65
  40. package/dist/ai-credentials/client.d.ts +0 -12
  41. package/dist/ai-credentials/client.js +0 -70
  42. package/dist/ai-credentials/index.d.ts +0 -1
  43. package/dist/ai-credentials/index.js +0 -1
  44. package/dist/base/event-binding.d.ts +0 -7
  45. package/dist/base/event-binding.js +0 -23
  46. package/dist/base/types.d.ts +0 -109
  47. package/dist/base/types.js +0 -4
  48. package/dist/browser-extensions/client.d.ts +0 -15
  49. package/dist/browser-extensions/client.js +0 -72
  50. package/dist/browser-extensions/index.d.ts +0 -2
  51. package/dist/browser-extensions/index.js +0 -1
  52. package/dist/browser-profiles/client.d.ts +0 -11
  53. package/dist/browser-profiles/client.js +0 -63
  54. package/dist/browser-profiles/index.d.ts +0 -1
  55. package/dist/browser-profiles/index.js +0 -1
  56. package/dist/captcha/index.d.ts +0 -1
  57. package/dist/captcha/index.js +0 -1
  58. package/dist/captcha/namespace.d.ts +0 -34
  59. package/dist/captcha/namespace.js +0 -41
  60. package/dist/client/index.d.ts +0 -1
  61. package/dist/client/index.js +0 -1
  62. package/dist/client/rpc.d.ts +0 -83
  63. package/dist/client/rpc.js +0 -354
  64. package/dist/config.d.ts +0 -5
  65. package/dist/config.js +0 -28
  66. package/dist/constants/browser.d.ts +0 -2
  67. package/dist/constants/browser.js +0 -1
  68. package/dist/contracts/agent-tools.d.ts +0 -45
  69. package/dist/contracts/agent-tools.js +0 -31
  70. package/dist/contracts/automation.d.ts +0 -265
  71. package/dist/contracts/automation.js +0 -109
  72. package/dist/contracts/browser-management.d.ts +0 -179
  73. package/dist/contracts/browser-management.js +0 -95
  74. package/dist/contracts/browser-use.d.ts +0 -136
  75. package/dist/contracts/browser-use.js +0 -93
  76. package/dist/contracts/captcha.d.ts +0 -114
  77. package/dist/contracts/captcha.js +0 -40
  78. package/dist/contracts/desktop.d.ts +0 -223
  79. package/dist/contracts/desktop.js +0 -121
  80. package/dist/contracts/drivers/playwright.d.ts +0 -2008
  81. package/dist/contracts/drivers/playwright.js +0 -2033
  82. package/dist/contracts/drivers/puppeteer.d.ts +0 -1221
  83. package/dist/contracts/drivers/puppeteer.js +0 -941
  84. package/dist/contracts/drivers/selenium.d.ts +0 -156
  85. package/dist/contracts/drivers/selenium.js +0 -61
  86. package/dist/contracts/drivers/stagehand.d.ts +0 -155
  87. package/dist/contracts/drivers/stagehand.js +0 -7
  88. package/dist/contracts/extensions.d.ts +0 -13
  89. package/dist/contracts/extensions.js +0 -9
  90. package/dist/contracts/index.d.ts +0 -13
  91. package/dist/contracts/index.js +0 -13
  92. package/dist/contracts/public-api.d.ts +0 -360
  93. package/dist/contracts/public-api.js +0 -17
  94. package/dist/contracts/runtime.d.ts +0 -81
  95. package/dist/contracts/runtime.js +0 -16
  96. package/dist/contracts/stagehand.d.ts +0 -253
  97. package/dist/contracts/stagehand.js +0 -145
  98. package/dist/contracts/storage.d.ts +0 -51
  99. package/dist/contracts/storage.js +0 -56
  100. package/dist/contracts/vault.d.ts +0 -119
  101. package/dist/contracts/vault.js +0 -112
  102. package/dist/contracts/version.d.ts +0 -3
  103. package/dist/contracts/version.js +0 -16
  104. package/dist/desktop.d.ts +0 -2
  105. package/dist/desktop.js +0 -3
  106. package/dist/drivers/desktop/index.d.ts +0 -65
  107. package/dist/drivers/desktop/index.js +0 -68
  108. package/dist/drivers/desktop/session.d.ts +0 -313
  109. package/dist/drivers/desktop/session.js +0 -432
  110. package/dist/drivers/playwright/event-emitter.d.ts +0 -160
  111. package/dist/drivers/playwright/event-emitter.js +0 -297
  112. package/dist/drivers/playwright/generated/api-request-context.d.ts +0 -137
  113. package/dist/drivers/playwright/generated/api-request-context.js +0 -154
  114. package/dist/drivers/playwright/generated/api-response.d.ts +0 -119
  115. package/dist/drivers/playwright/generated/api-response.js +0 -123
  116. package/dist/drivers/playwright/generated/browser-context.d.ts +0 -284
  117. package/dist/drivers/playwright/generated/browser-context.js +0 -458
  118. package/dist/drivers/playwright/generated/browser.d.ts +0 -120
  119. package/dist/drivers/playwright/generated/browser.js +0 -151
  120. package/dist/drivers/playwright/generated/clock.d.ts +0 -80
  121. package/dist/drivers/playwright/generated/clock.js +0 -94
  122. package/dist/drivers/playwright/generated/console-message.d.ts +0 -94
  123. package/dist/drivers/playwright/generated/console-message.js +0 -89
  124. package/dist/drivers/playwright/generated/coverage.d.ts +0 -57
  125. package/dist/drivers/playwright/generated/coverage.js +0 -66
  126. package/dist/drivers/playwright/generated/dialog.d.ts +0 -79
  127. package/dist/drivers/playwright/generated/dialog.js +0 -80
  128. package/dist/drivers/playwright/generated/element-handle.d.ts +0 -399
  129. package/dist/drivers/playwright/generated/element-handle.js +0 -501
  130. package/dist/drivers/playwright/generated/frame-locator.d.ts +0 -34
  131. package/dist/drivers/playwright/generated/frame-locator.js +0 -63
  132. package/dist/drivers/playwright/generated/frame.d.ts +0 -557
  133. package/dist/drivers/playwright/generated/frame.js +0 -634
  134. package/dist/drivers/playwright/generated/js-handle.d.ts +0 -72
  135. package/dist/drivers/playwright/generated/js-handle.js +0 -92
  136. package/dist/drivers/playwright/generated/keyboard.d.ts +0 -103
  137. package/dist/drivers/playwright/generated/keyboard.js +0 -113
  138. package/dist/drivers/playwright/generated/locator.d.ts +0 -795
  139. package/dist/drivers/playwright/generated/locator.js +0 -974
  140. package/dist/drivers/playwright/generated/mouse.d.ts +0 -97
  141. package/dist/drivers/playwright/generated/mouse.js +0 -109
  142. package/dist/drivers/playwright/generated/page.d.ts +0 -762
  143. package/dist/drivers/playwright/generated/page.js +0 -988
  144. package/dist/drivers/playwright/generated/touchscreen.d.ts +0 -34
  145. package/dist/drivers/playwright/generated/touchscreen.js +0 -37
  146. package/dist/drivers/playwright/generated/tracing.d.ts +0 -78
  147. package/dist/drivers/playwright/generated/tracing.js +0 -80
  148. package/dist/drivers/playwright/generated/worker.d.ts +0 -53
  149. package/dist/drivers/playwright/generated/worker.js +0 -59
  150. package/dist/drivers/playwright/index.d.ts +0 -19
  151. package/dist/drivers/playwright/index.js +0 -20
  152. package/dist/drivers/playwright/remote-base.d.ts +0 -62
  153. package/dist/drivers/playwright/remote-base.js +0 -86
  154. package/dist/drivers/playwright/types.d.ts +0 -148
  155. package/dist/drivers/playwright/types.js +0 -8
  156. package/dist/drivers/puppeteer/errors.d.ts +0 -50
  157. package/dist/drivers/puppeteer/errors.js +0 -71
  158. package/dist/drivers/puppeteer/event-emitter.d.ts +0 -145
  159. package/dist/drivers/puppeteer/event-emitter.js +0 -259
  160. package/dist/drivers/puppeteer/generated/accessibility.d.ts +0 -77
  161. package/dist/drivers/puppeteer/generated/accessibility.js +0 -74
  162. package/dist/drivers/puppeteer/generated/browser-context.d.ts +0 -116
  163. package/dist/drivers/puppeteer/generated/browser-context.js +0 -168
  164. package/dist/drivers/puppeteer/generated/browser.d.ts +0 -169
  165. package/dist/drivers/puppeteer/generated/browser.js +0 -246
  166. package/dist/drivers/puppeteer/generated/console-message.d.ts +0 -54
  167. package/dist/drivers/puppeteer/generated/console-message.js +0 -69
  168. package/dist/drivers/puppeteer/generated/coverage.d.ts +0 -49
  169. package/dist/drivers/puppeteer/generated/coverage.js +0 -57
  170. package/dist/drivers/puppeteer/generated/dialog.d.ts +0 -46
  171. package/dist/drivers/puppeteer/generated/dialog.js +0 -60
  172. package/dist/drivers/puppeteer/generated/element-handle.d.ts +0 -261
  173. package/dist/drivers/puppeteer/generated/element-handle.js +0 -341
  174. package/dist/drivers/puppeteer/generated/file-chooser.d.ts +0 -34
  175. package/dist/drivers/puppeteer/generated/file-chooser.js +0 -43
  176. package/dist/drivers/puppeteer/generated/frame.d.ts +0 -221
  177. package/dist/drivers/puppeteer/generated/frame.js +0 -302
  178. package/dist/drivers/puppeteer/generated/http-request.d.ts +0 -195
  179. package/dist/drivers/puppeteer/generated/http-request.js +0 -243
  180. package/dist/drivers/puppeteer/generated/http-response.d.ts +0 -142
  181. package/dist/drivers/puppeteer/generated/http-response.js +0 -169
  182. package/dist/drivers/puppeteer/generated/js-handle.d.ts +0 -104
  183. package/dist/drivers/puppeteer/generated/js-handle.js +0 -125
  184. package/dist/drivers/puppeteer/generated/keyboard.d.ts +0 -79
  185. package/dist/drivers/puppeteer/generated/keyboard.js +0 -89
  186. package/dist/drivers/puppeteer/generated/locator.d.ts +0 -141
  187. package/dist/drivers/puppeteer/generated/locator.js +0 -164
  188. package/dist/drivers/puppeteer/generated/mouse.d.ts +0 -74
  189. package/dist/drivers/puppeteer/generated/mouse.js +0 -94
  190. package/dist/drivers/puppeteer/generated/page.d.ts +0 -604
  191. package/dist/drivers/puppeteer/generated/page.js +0 -776
  192. package/dist/drivers/puppeteer/generated/target.d.ts +0 -105
  193. package/dist/drivers/puppeteer/generated/target.js +0 -123
  194. package/dist/drivers/puppeteer/generated/touchscreen.d.ts +0 -87
  195. package/dist/drivers/puppeteer/generated/touchscreen.js +0 -103
  196. package/dist/drivers/puppeteer/generated/tracing.d.ts +0 -38
  197. package/dist/drivers/puppeteer/generated/tracing.js +0 -43
  198. package/dist/drivers/puppeteer/generated/web-worker.d.ts +0 -63
  199. package/dist/drivers/puppeteer/generated/web-worker.js +0 -73
  200. package/dist/drivers/puppeteer/index.d.ts +0 -21
  201. package/dist/drivers/puppeteer/index.js +0 -23
  202. package/dist/drivers/puppeteer/remote-base.d.ts +0 -57
  203. package/dist/drivers/puppeteer/remote-base.js +0 -79
  204. package/dist/drivers/puppeteer/types.d.ts +0 -178
  205. package/dist/drivers/puppeteer/types.js +0 -8
  206. package/dist/drivers/selenium/driver.d.ts +0 -28
  207. package/dist/drivers/selenium/driver.js +0 -169
  208. package/dist/drivers/selenium/element.d.ts +0 -34
  209. package/dist/drivers/selenium/element.js +0 -73
  210. package/dist/drivers/selenium/index.d.ts +0 -3
  211. package/dist/drivers/selenium/index.js +0 -5
  212. package/dist/drivers/selenium/types.d.ts +0 -2
  213. package/dist/drivers/selenium/types.js +0 -12
  214. package/dist/drivers/stagehand/generated/context.d.ts +0 -127
  215. package/dist/drivers/stagehand/generated/context.js +0 -153
  216. package/dist/drivers/stagehand/generated/locator.d.ts +0 -324
  217. package/dist/drivers/stagehand/generated/locator.js +0 -368
  218. package/dist/drivers/stagehand/generated/page.d.ts +0 -377
  219. package/dist/drivers/stagehand/generated/page.js +0 -439
  220. package/dist/drivers/stagehand/generated/response.d.ts +0 -197
  221. package/dist/drivers/stagehand/generated/response.js +0 -232
  222. package/dist/drivers/stagehand/index.d.ts +0 -5
  223. package/dist/drivers/stagehand/index.js +0 -8
  224. package/dist/drivers/stagehand/types.d.ts +0 -1
  225. package/dist/drivers/stagehand/types.js +0 -7
  226. package/dist/extensions/client.d.ts +0 -47
  227. package/dist/extensions/client.js +0 -154
  228. package/dist/extensions/index.d.ts +0 -1
  229. package/dist/extensions/index.js +0 -1
  230. package/dist/internal/dev-client.d.ts +0 -5
  231. package/dist/internal/dev-client.js +0 -9
  232. package/dist/internal/rpc-targets.d.ts +0 -17
  233. package/dist/internal/rpc-targets.js +0 -58
  234. package/dist/internal/serialization.d.ts +0 -32
  235. package/dist/internal/serialization.js +0 -42
  236. package/dist/internal/transport.d.ts +0 -24
  237. package/dist/internal/transport.js +0 -29
  238. package/dist/playwright.d.ts +0 -1
  239. package/dist/playwright.js +0 -2
  240. package/dist/puppeteer.d.ts +0 -1
  241. package/dist/puppeteer.js +0 -2
  242. package/dist/selenium.d.ts +0 -1
  243. package/dist/selenium.js +0 -2
  244. package/dist/stagehand.d.ts +0 -1
  245. package/dist/stagehand.js +0 -2
  246. package/dist/storage/client.d.ts +0 -151
  247. package/dist/storage/client.js +0 -329
  248. package/dist/storage/index.d.ts +0 -2
  249. package/dist/storage/index.js +0 -4
  250. package/dist/telemetry.d.ts +0 -18
  251. package/dist/telemetry.js +0 -93
  252. package/dist/updates/client.d.ts +0 -8
  253. package/dist/updates/client.js +0 -128
  254. package/dist/updates/index.d.ts +0 -1
  255. package/dist/updates/index.js +0 -1
  256. package/dist/utils/http.d.ts +0 -39
  257. package/dist/utils/http.js +0 -88
  258. package/dist/utils/index.d.ts +0 -4
  259. package/dist/utils/index.js +0 -4
  260. package/dist/utils/logger.d.ts +0 -27
  261. package/dist/utils/logger.js +0 -74
  262. package/dist/utils/schema.d.ts +0 -17
  263. package/dist/utils/schema.js +0 -31
  264. package/dist/utils/url.d.ts +0 -5
  265. package/dist/utils/url.js +0 -7
  266. package/dist/vault/client.d.ts +0 -43
  267. package/dist/vault/client.js +0 -123
  268. package/dist/vault/index.d.ts +0 -1
  269. package/dist/vault/index.js +0 -1
  270. package/dist/workspaces/browser-runtime.d.ts +0 -251
  271. package/dist/workspaces/browser-runtime.js +0 -1025
  272. package/dist/workspaces/client.d.ts +0 -48
  273. package/dist/workspaces/client.js +0 -222
  274. package/dist/workspaces/index.d.ts +0 -2
  275. package/dist/workspaces/index.js +0 -2
  276. package/dist/workspaces/runtime-event-pump.d.ts +0 -65
  277. package/dist/workspaces/runtime-event-pump.js +0 -716
@@ -1,557 +0,0 @@
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 { SerializedHandle } from '../../../internal/serialization.js';
9
- import { RemoteBase } from '../remote-base.js';
10
- import type { PlaywrightCheckOptions, PlaywrightClickOptions, PlaywrightFillOptions, PlaywrightFocusOptions, PlaywrightGetAttributeOptions, PlaywrightGetByAltTextOptions, PlaywrightGetByLabelOptions, PlaywrightGetByPlaceholderOptions, PlaywrightGetByRoleOptions, PlaywrightGetByTextOptions, PlaywrightGetByTitleOptions, PlaywrightGotoOptions, PlaywrightHoverOptions, PlaywrightInnerHTMLOptions, PlaywrightInnerTextOptions, PlaywrightInputValueOptions, PlaywrightIsOptions, PlaywrightPressOptions, PlaywrightSelectOptionOptions, PlaywrightTextContentOptions, PlaywrightTypeOptions, PlaywrightWaitForSelectorOptions, PlaywrightWaitForURLOptions } from '../types.js';
11
- import type { RemotePlaywrightElementHandle } from './element-handle.js';
12
- import type { RemotePlaywrightJSHandle } from './js-handle.js';
13
- import type { RemotePlaywrightLocator } from './locator.js';
14
- import type { RemotePlaywrightFrameLocator } from './frame-locator.js';
15
- import type { RemotePlaywrightPage } from './page.js';
16
- /**
17
- * RemotePlaywrightFrame - Remote Playwright Frame API over RPC.
18
- *
19
- * @see https://playwright.dev/docs/api/class-frame
20
- */
21
- export declare class RemotePlaywrightFrame extends RemoteBase {
22
- /** Whether this frame has been detached. */
23
- _isDetached: boolean;
24
- private createElementHandle;
25
- private createFrame;
26
- private createLocator;
27
- private createFrameLocator;
28
- private createJSHandle;
29
- private getPage;
30
- constructor(id: string, sendRpc: SimpleRpcSender, createElementHandle: (handleId: string) => RemotePlaywrightElementHandle, createFrame: (frameId: string) => RemotePlaywrightFrame, createLocator: (selector: string) => RemotePlaywrightLocator, createFrameLocator: (selector: string) => RemotePlaywrightFrameLocator, createJSHandle: (handleId: string) => RemotePlaywrightJSHandle, getPage: () => RemotePlaywrightPage);
31
- /**
32
- * The page associated with this frame.
33
- */
34
- page(): RemotePlaywrightPage;
35
- /**
36
- * Creates a Locator for the given selector.
37
- */
38
- locator(selector: string, options?: {
39
- has?: RemotePlaywrightLocator;
40
- hasNot?: RemotePlaywrightLocator;
41
- hasText?: string | RegExp;
42
- hasNotText?: string | RegExp;
43
- }): RemotePlaywrightLocator;
44
- /**
45
- * Returns a FrameLocator for the given selector.
46
- */
47
- frameLocator(selector: string): RemotePlaywrightFrameLocator;
48
- /**
49
- * Allows locating elements by their ARIA role, ARIA attributes and accessible name.
50
- */
51
- getByRole(role: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem", options?: PlaywrightGetByRoleOptions): RemotePlaywrightLocator;
52
- /**
53
- * Allows locating elements that contain given text.
54
- */
55
- getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): RemotePlaywrightLocator;
56
- /**
57
- * Allows locating input elements by the text of the associated label.
58
- */
59
- getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): RemotePlaywrightLocator;
60
- /**
61
- * Allows locating input elements by the placeholder text.
62
- */
63
- getByPlaceholder(text: string | RegExp, options?: PlaywrightGetByPlaceholderOptions): RemotePlaywrightLocator;
64
- /**
65
- * Allows locating elements by their alt text.
66
- */
67
- getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): RemotePlaywrightLocator;
68
- /**
69
- * Allows locating elements by their title attribute.
70
- */
71
- getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): RemotePlaywrightLocator;
72
- /**
73
- * Locate element by the test id.
74
- */
75
- getByTestId(testId: string | RegExp): RemotePlaywrightLocator;
76
- /**
77
- * Evaluates a function in the frame's context and returns a handle to the result.
78
- * Note: Returns serialized handle reference. Full JSHandle support not yet available.
79
- */
80
- evaluateHandle<R = unknown>(pageFunction: string | ((...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<RemotePlaywrightJSHandle>;
81
- /**
82
- * Returns when the pageFunction returns a truthy value.
83
- * Note: Returns serialized handle reference. Full JSHandle support not yet available.
84
- */
85
- waitForFunction<R = unknown>(pageFunction: string | ((...args: unknown[]) => R | Promise<R>), arg?: unknown, options?: {
86
- timeout?: number;
87
- polling?: number | 'raf';
88
- }): Promise<RemotePlaywrightJSHandle>;
89
- /**
90
- * Returns `true` if the frame has been detached, or `false` otherwise.
91
- *
92
- * @see https://playwright.dev/docs/api/class-frame#frame-is-detached
93
- */
94
- isDetached(): boolean;
95
- /**
96
- * Returns the frame element associated with this frame.
97
- *
98
- * @remarks
99
- * Returns the ElementHandle for the <iframe> or <frame> tag for this frame. Returns null for the main frame.
100
- *
101
- * @see https://playwright.dev/docs/api/class-frame#frame-frame-element
102
- */
103
- frameElement(): Promise<RemotePlaywrightElementHandle>;
104
- /**
105
- * Returns frame's URL.
106
- *
107
- * @see https://playwright.dev/docs/api/class-frame#frame-url
108
- */
109
- url(): Promise<string>;
110
- /**
111
- * Returns frame's name attribute as specified in the tag.
112
- *
113
- * @remarks
114
- * If the name is empty, returns the id attribute instead. Returns empty string if both name and id are empty.
115
- *
116
- * @see https://playwright.dev/docs/api/class-frame#frame-name
117
- */
118
- name(): Promise<string>;
119
- /**
120
- * Returns the page title.
121
- *
122
- * @see https://playwright.dev/docs/api/class-frame#frame-title
123
- */
124
- title(): Promise<string>;
125
- /**
126
- * Gets the full HTML contents of the frame, including the doctype.
127
- *
128
- * @see https://playwright.dev/docs/api/class-frame#frame-content
129
- */
130
- content(): Promise<string>;
131
- /**
132
- * Sets the content of the frame.
133
- *
134
- * @remarks
135
- * This method takes the HTML to set as the frame's content. The default waitUntil is 'load'.
136
- *
137
- * @see https://playwright.dev/docs/api/class-frame#frame-set-content
138
- */
139
- setContent(html: string, options?: {
140
- timeout?: number;
141
- waitUntil?: "load" | "domcontentloaded" | "networkidle" | "commit";
142
- }): Promise<void>;
143
- /**
144
- * Parent frame, if any. Detached frames and main frames return null.
145
- *
146
- * @see https://playwright.dev/docs/api/class-frame#frame-parent-frame
147
- */
148
- parentFrame(): Promise<RemotePlaywrightFrame | null>;
149
- /**
150
- * Returns child frames of this frame.
151
- *
152
- * @see https://playwright.dev/docs/api/class-frame#frame-child-frames
153
- */
154
- childFrames(): Promise<RemotePlaywrightFrame[]>;
155
- /**
156
- * Returns the main resource response.
157
- *
158
- * @remarks
159
- * Navigates the frame to the given URL. In case of multiple redirects, the navigation will resolve with the first non-redirect response. The method will throw an error if navigation fails. The method will not throw an error when any valid HTTP status code is returned by the remote server.
160
- *
161
- * @see https://playwright.dev/docs/api/class-frame#frame-goto
162
- */
163
- goto(url: string, options?: PlaywrightGotoOptions): Promise<SerializedHandle | null>;
164
- /**
165
- * Waits for the frame to navigate to the given URL.
166
- *
167
- * @remarks
168
- * This method can be used after an action that causes navigation. A glob pattern, regex pattern or predicate receiving URL to match while waiting for the navigation.
169
- *
170
- * @see https://playwright.dev/docs/api/class-frame#frame-wait-for-url
171
- */
172
- waitForURL(url: string | RegExp | ((url: URL) => boolean), options?: PlaywrightWaitForURLOptions): Promise<void>;
173
- /**
174
- * Waits for the required load state to be reached.
175
- * @param state - State to wait for, defaults to load.
176
- *
177
- * @remarks
178
- * This method returns when the page reaches a required load state, 'load' by default. The navigation must have been committed when this method is called.
179
- *
180
- * @see https://playwright.dev/docs/api/class-frame#frame-wait-for-load-state
181
- */
182
- waitForLoadState(state?: "load" | "domcontentloaded" | "networkidle", options?: {
183
- timeout?: number;
184
- }): Promise<void>;
185
- /**
186
- * Returns the ElementHandle pointing to the frame element.
187
- *
188
- * @remarks
189
- * This method queries the frame for the given selector. If no element matches the selector, returns null. Discouraged: use locator-based frame.locator() instead.
190
- *
191
- * @see https://playwright.dev/docs/api/class-frame#frame-query-selector
192
- */
193
- $(selector: string): Promise<RemotePlaywrightElementHandle | null>;
194
- /**
195
- * Returns the ElementHandles pointing to the frame elements.
196
- *
197
- * @remarks
198
- * This method queries the frame for all elements matching the given selector. Returns empty array if no elements match. Discouraged: use locator-based frame.locator() instead.
199
- *
200
- * @see https://playwright.dev/docs/api/class-frame#frame-query-selector-all
201
- */
202
- $$(selector: string): Promise<RemotePlaywrightElementHandle[]>;
203
- /**
204
- * Returns when element specified by selector satisfies state option.
205
- *
206
- * @remarks
207
- * Returns null if waiting for hidden or detached. Returns the ElementHandle matching the selector in visible/attached states. Discouraged: use locator-based locator.waitFor() instead.
208
- *
209
- * @see https://playwright.dev/docs/api/class-frame#frame-wait-for-selector
210
- */
211
- waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<RemotePlaywrightElementHandle | null>;
212
- /**
213
- * Waits for the given timeout in milliseconds.
214
- *
215
- * @remarks
216
- * Note: This should never be used in production. Tests that wait for time are inherently flaky. Use Locator actions and web assertions that wait automatically.
217
- *
218
- * @see https://playwright.dev/docs/api/class-frame#frame-wait-for-timeout
219
- */
220
- waitForTimeout(timeout: number): Promise<void>;
221
- /**
222
- * Clicks an element matching selector.
223
- *
224
- * @remarks
225
- * This method waits for actionability checks, scrolls element into view, and then clicks the center of the element. Discouraged: use locator-based locator.click() instead.
226
- *
227
- * @see https://playwright.dev/docs/api/class-frame#frame-click
228
- */
229
- click(selector: string, options?: PlaywrightClickOptions): Promise<void>;
230
- /**
231
- * Double-clicks an element matching selector.
232
- *
233
- * @remarks
234
- * This method waits for actionability checks, scrolls element into view, and then double-clicks the center of the element. Discouraged: use locator-based locator.dblclick() instead.
235
- *
236
- * @see https://playwright.dev/docs/api/class-frame#frame-dblclick
237
- */
238
- dblclick(selector: string, options?: PlaywrightClickOptions): Promise<void>;
239
- /**
240
- * Fills a form field with text.
241
- *
242
- * @remarks
243
- * This method waits for an element matching selector, waits for actionability checks, focuses the element, fills it and triggers an input event. Discouraged: use locator-based locator.fill() instead.
244
- *
245
- * @see https://playwright.dev/docs/api/class-frame#frame-fill
246
- */
247
- fill(selector: string, value: string, options?: PlaywrightFillOptions): Promise<void>;
248
- /**
249
- * Types into an element matching selector.
250
- *
251
- * @remarks
252
- * Sends a keydown, keypress/input, and keyup event for each character in the text. Discouraged: In most cases, you should use locator.fill() instead.
253
- *
254
- * @see https://playwright.dev/docs/api/class-frame#frame-type
255
- */
256
- type(selector: string, text: string, options?: PlaywrightTypeOptions): Promise<void>;
257
- /**
258
- * Presses a key.
259
- *
260
- * @remarks
261
- * Focuses the element matching selector, and then uses keyboard.press. Discouraged: use locator-based locator.press() instead.
262
- *
263
- * @see https://playwright.dev/docs/api/class-frame#frame-press
264
- */
265
- press(selector: string, key: string, options?: PlaywrightPressOptions): Promise<void>;
266
- /**
267
- * Hovers over an element matching selector.
268
- *
269
- * @remarks
270
- * This method waits for actionability checks, scrolls element into view, and then hovers over the center of the element. Discouraged: use locator-based locator.hover() instead.
271
- *
272
- * @see https://playwright.dev/docs/api/class-frame#frame-hover
273
- */
274
- hover(selector: string, options?: PlaywrightHoverOptions): Promise<void>;
275
- /**
276
- * Fetches the element matching selector and focuses it.
277
- *
278
- * @remarks
279
- * If there is no element matching selector, the method waits until a matching element appears in the DOM. Discouraged: use locator-based locator.focus() instead.
280
- *
281
- * @see https://playwright.dev/docs/api/class-frame#frame-focus
282
- */
283
- focus(selector: string, options?: PlaywrightFocusOptions): Promise<void>;
284
- /**
285
- * Taps an element matching selector.
286
- *
287
- * @remarks
288
- * This method waits for actionability checks, scrolls element into view, and then taps the center of the element. Discouraged: use locator-based locator.tap() instead.
289
- *
290
- * @see https://playwright.dev/docs/api/class-frame#frame-tap
291
- */
292
- tap(selector: string, options?: {
293
- force?: boolean;
294
- modifiers?: ("Alt" | "Control" | "Meta" | "Shift")[];
295
- noWaitAfter?: boolean;
296
- position?: {
297
- x: number;
298
- y: number;
299
- };
300
- strict?: boolean;
301
- timeout?: number;
302
- trial?: boolean;
303
- }): Promise<void>;
304
- /**
305
- * Checks a checkbox or radio element.
306
- *
307
- * @remarks
308
- * This method checks an element matching selector by performing the following steps: scrolls element into view, and then uses click to check the element. Discouraged: use locator-based locator.check() instead.
309
- *
310
- * @see https://playwright.dev/docs/api/class-frame#frame-check
311
- */
312
- check(selector: string, options?: PlaywrightCheckOptions): Promise<void>;
313
- /**
314
- * Unchecks a checkbox element.
315
- *
316
- * @remarks
317
- * This method unchecks an element matching selector by scrolling element into view and using click to uncheck the element. Discouraged: use locator-based locator.uncheck() instead.
318
- *
319
- * @see https://playwright.dev/docs/api/class-frame#frame-uncheck
320
- */
321
- uncheck(selector: string, options?: PlaywrightCheckOptions): Promise<void>;
322
- /**
323
- * Checks or unchecks a checkbox or radio element.
324
- *
325
- * @remarks
326
- * This method checks or unchecks an element matching selector. Discouraged: use locator-based locator.setChecked() instead.
327
- *
328
- * @see https://playwright.dev/docs/api/class-frame#frame-set-checked
329
- */
330
- setChecked(selector: string, checked: boolean, options?: PlaywrightCheckOptions): Promise<void>;
331
- /**
332
- * Selects option(s) in the select element.
333
- *
334
- * @remarks
335
- * Returns array of selected option values. Shortcuts such as "blue" match both value and label. Objects such as { label: "blue" } match by label only. Discouraged: use locator-based locator.selectOption() instead.
336
- *
337
- * @see https://playwright.dev/docs/api/class-frame#frame-select-option
338
- */
339
- selectOption(selector: string, values: string | string[] | {
340
- value?: string;
341
- label?: string;
342
- index?: number;
343
- } | {
344
- value?: string;
345
- label?: string;
346
- index?: number;
347
- }[] | null, options?: PlaywrightSelectOptionOptions): Promise<string[]>;
348
- /**
349
- * Sets the file input element to the given files.
350
- *
351
- * @remarks
352
- * Empty array clears the selected files. Discouraged: use locator-based locator.setInputFiles() instead.
353
- *
354
- * @see https://playwright.dev/docs/api/class-frame#frame-set-input-files
355
- */
356
- setInputFiles(selector: string, files: string | string[] | {
357
- name: string;
358
- mimeType: string;
359
- buffer: Buffer;
360
- } | {
361
- name: string;
362
- mimeType: string;
363
- buffer: Buffer;
364
- }[], options?: {
365
- noWaitAfter?: boolean;
366
- strict?: boolean;
367
- timeout?: number;
368
- }): Promise<void>;
369
- /**
370
- * Drags source element to target element.
371
- *
372
- * @remarks
373
- * This method drags the source element to the target element. It will first move to the source element, perform a mousedown, then move to the target element and perform a mouseup.
374
- *
375
- * @see https://playwright.dev/docs/api/class-frame#frame-drag-and-drop
376
- */
377
- dragAndDrop(source: string, target: string, options?: {
378
- force?: boolean;
379
- noWaitAfter?: boolean;
380
- sourcePosition?: {
381
- x: number;
382
- y: number;
383
- };
384
- strict?: boolean;
385
- targetPosition?: {
386
- x: number;
387
- y: number;
388
- };
389
- timeout?: number;
390
- trial?: boolean;
391
- }): Promise<void>;
392
- /**
393
- * Dispatches an event on the element.
394
- *
395
- * @remarks
396
- * This method dispatches a DOM event on the element matching selector. Events are composed, cancelable, and bubble by default. Discouraged: use locator-based locator.dispatchEvent() instead.
397
- *
398
- * @see https://playwright.dev/docs/api/class-frame#frame-dispatch-event
399
- */
400
- dispatchEvent(selector: string, type: string, eventInit?: unknown, options?: {
401
- strict?: boolean;
402
- timeout?: number;
403
- }): Promise<void>;
404
- /**
405
- * Returns the element.textContent.
406
- *
407
- * @remarks
408
- * Discouraged: use locator-based locator.textContent() instead.
409
- *
410
- * @see https://playwright.dev/docs/api/class-frame#frame-text-content
411
- */
412
- textContent(selector: string, options?: PlaywrightTextContentOptions): Promise<string | null>;
413
- /**
414
- * Returns the element.innerText.
415
- *
416
- * @remarks
417
- * Discouraged: use locator-based locator.innerText() instead.
418
- *
419
- * @see https://playwright.dev/docs/api/class-frame#frame-inner-text
420
- */
421
- innerText(selector: string, options?: PlaywrightInnerTextOptions): Promise<string>;
422
- /**
423
- * Returns the element.innerHTML.
424
- *
425
- * @remarks
426
- * Discouraged: use locator-based locator.innerHTML() instead.
427
- *
428
- * @see https://playwright.dev/docs/api/class-frame#frame-inner-html
429
- */
430
- innerHTML(selector: string, options?: PlaywrightInnerHTMLOptions): Promise<string>;
431
- /**
432
- * Returns element attribute value.
433
- *
434
- * @remarks
435
- * Discouraged: use locator-based locator.getAttribute() instead.
436
- *
437
- * @see https://playwright.dev/docs/api/class-frame#frame-get-attribute
438
- */
439
- getAttribute(selector: string, name: string, options?: PlaywrightGetAttributeOptions): Promise<string | null>;
440
- /**
441
- * Returns input.value for the selected <input> or <textarea> or <select> element.
442
- *
443
- * @remarks
444
- * Throws for non-input elements. Discouraged: use locator-based locator.inputValue() instead.
445
- *
446
- * @see https://playwright.dev/docs/api/class-frame#frame-input-value
447
- */
448
- inputValue(selector: string, options?: PlaywrightInputValueOptions): Promise<string>;
449
- /**
450
- * Returns whether the element is checked.
451
- *
452
- * @remarks
453
- * Throws if the element is not a checkbox or radio input. Discouraged: use locator-based locator.isChecked() instead.
454
- *
455
- * @see https://playwright.dev/docs/api/class-frame#frame-is-checked
456
- */
457
- isChecked(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
458
- /**
459
- * Returns whether the element is disabled.
460
- *
461
- * @remarks
462
- * Discouraged: use locator-based locator.isDisabled() instead.
463
- *
464
- * @see https://playwright.dev/docs/api/class-frame#frame-is-disabled
465
- */
466
- isDisabled(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
467
- /**
468
- * Returns whether the element is editable.
469
- *
470
- * @remarks
471
- * Discouraged: use locator-based locator.isEditable() instead.
472
- *
473
- * @see https://playwright.dev/docs/api/class-frame#frame-is-editable
474
- */
475
- isEditable(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
476
- /**
477
- * Returns whether the element is enabled.
478
- *
479
- * @remarks
480
- * Discouraged: use locator-based locator.isEnabled() instead.
481
- *
482
- * @see https://playwright.dev/docs/api/class-frame#frame-is-enabled
483
- */
484
- isEnabled(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
485
- /**
486
- * Returns whether the element is hidden.
487
- *
488
- * @remarks
489
- * Opposite of isVisible(). Discouraged: use locator-based locator.isHidden() instead.
490
- *
491
- * @see https://playwright.dev/docs/api/class-frame#frame-is-hidden
492
- */
493
- isHidden(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
494
- /**
495
- * Returns whether the element is visible.
496
- *
497
- * @remarks
498
- * Element is considered visible if it has non-zero bounding box and is not visibility:hidden. Discouraged: use locator-based locator.isVisible() instead.
499
- *
500
- * @see https://playwright.dev/docs/api/class-frame#frame-is-visible
501
- */
502
- isVisible(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
503
- /**
504
- * Evaluates JavaScript in the frame context.
505
- *
506
- * @remarks
507
- * Returns the return value of pageFunction. If the function returns a Promise, evaluate will wait for that Promise to resolve and return its value.
508
- *
509
- * @see https://playwright.dev/docs/api/class-frame#frame-evaluate
510
- */
511
- evaluate<R = unknown>(pageFunction: string | ((...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<R>;
512
- /**
513
- * Finds an element matching selector and passes it to pageFunction.
514
- *
515
- * @remarks
516
- * Returns the value of pageFunction. Throws if selector matches no elements. Discouraged: use locator-based locator.evaluate() instead.
517
- *
518
- * @see https://playwright.dev/docs/api/class-frame#frame-eval-on-selector
519
- */
520
- $eval<R = unknown>(selector: string, pageFunction: string | ((element: Element, ...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<R>;
521
- /**
522
- * Finds all elements matching selector and passes them to pageFunction.
523
- *
524
- * @remarks
525
- * Returns the value of pageFunction. Discouraged: use locator-based locator.evaluateAll() instead.
526
- *
527
- * @see https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all
528
- */
529
- $$eval<R = unknown>(selector: string, pageFunction: string | ((elements: Element[], ...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<R>;
530
- /**
531
- * Adds a <script> tag into the page with the desired url or content.
532
- *
533
- * @remarks
534
- * Returns the added tag when the script's onload fires or when the script content was injected into frame.
535
- *
536
- * @see https://playwright.dev/docs/api/class-frame#frame-add-script-tag
537
- */
538
- addScriptTag(options?: {
539
- content?: string;
540
- path?: string;
541
- type?: string;
542
- url?: string;
543
- }): Promise<RemotePlaywrightElementHandle>;
544
- /**
545
- * Adds a <style> tag into the page with the desired url or content.
546
- *
547
- * @remarks
548
- * Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.
549
- *
550
- * @see https://playwright.dev/docs/api/class-frame#frame-add-style-tag
551
- */
552
- addStyleTag(options?: {
553
- content?: string;
554
- path?: string;
555
- url?: string;
556
- }): Promise<RemotePlaywrightElementHandle>;
557
- }