brave-real-puppeteer-core 24.25.0 → 24.33.0-patch.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 (468) hide show
  1. package/README.md +5 -5
  2. package/advanced-stealth.js +1 -1
  3. package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts +96 -0
  4. package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
  5. package/lib/cjs/puppeteer/api/BluetoothEmulation.js +8 -0
  6. package/lib/cjs/puppeteer/api/BluetoothEmulation.js.map +1 -0
  7. package/lib/cjs/puppeteer/api/Browser.d.ts +111 -2
  8. package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  9. package/lib/cjs/puppeteer/api/Browser.js +4 -2
  10. package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  11. package/lib/cjs/puppeteer/api/BrowserContext.d.ts +5 -3
  12. package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
  13. package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
  14. package/lib/cjs/puppeteer/api/CDPSession.d.ts.map +1 -1
  15. package/lib/cjs/puppeteer/api/CDPSession.js.map +1 -1
  16. package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +62 -0
  17. package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  18. package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +38 -0
  19. package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  20. package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  21. package/lib/cjs/puppeteer/api/ElementHandle.js +1 -1
  22. package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  23. package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  24. package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  25. package/lib/cjs/puppeteer/api/Frame.js +4 -4
  26. package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  27. package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +1 -1
  28. package/lib/cjs/puppeteer/api/Page.d.ts +41 -7
  29. package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  30. package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  31. package/lib/cjs/puppeteer/api/api.d.ts +2 -0
  32. package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
  33. package/lib/cjs/puppeteer/api/api.js +1 -0
  34. package/lib/cjs/puppeteer/api/api.js.map +1 -1
  35. package/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  36. package/lib/cjs/puppeteer/bidi/BidiOverCdp.js +1 -1
  37. package/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  38. package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
  39. package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
  40. package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js +42 -0
  41. package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
  42. package/lib/cjs/puppeteer/bidi/Browser.d.ts +6 -1
  43. package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  44. package/lib/cjs/puppeteer/bidi/Browser.js +36 -14
  45. package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  46. package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
  47. package/lib/cjs/puppeteer/bidi/BrowserConnector.js +4 -3
  48. package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
  49. package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +3 -3
  50. package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  51. package/lib/cjs/puppeteer/bidi/BrowserContext.js +6 -3
  52. package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
  53. package/lib/cjs/puppeteer/bidi/Connection.d.ts +2 -1
  54. package/lib/cjs/puppeteer/bidi/Connection.d.ts.map +1 -1
  55. package/lib/cjs/puppeteer/bidi/Connection.js +19 -2
  56. package/lib/cjs/puppeteer/bidi/Connection.js.map +1 -1
  57. package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
  58. package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
  59. package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js +90 -0
  60. package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
  61. package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -1
  62. package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  63. package/lib/cjs/puppeteer/bidi/Frame.js +3 -2
  64. package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  65. package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +0 -1
  66. package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  67. package/lib/cjs/puppeteer/bidi/HTTPRequest.js +2 -29
  68. package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  69. package/lib/cjs/puppeteer/bidi/Page.d.ts +10 -8
  70. package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  71. package/lib/cjs/puppeteer/bidi/Page.js +63 -47
  72. package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  73. package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +8 -0
  74. package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  75. package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +55 -2
  76. package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  77. package/lib/cjs/puppeteer/bidi/core/Connection.d.ts.map +1 -1
  78. package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
  79. package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  80. package/lib/cjs/puppeteer/bidi/core/Request.d.ts +1 -0
  81. package/lib/cjs/puppeteer/bidi/core/Request.d.ts.map +1 -1
  82. package/lib/cjs/puppeteer/bidi/core/Request.js +30 -4
  83. package/lib/cjs/puppeteer/bidi/core/Request.js.map +1 -1
  84. package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
  85. package/lib/cjs/puppeteer/bidi/util.js +7 -0
  86. package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
  87. package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +10 -0
  88. package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  89. package/lib/cjs/puppeteer/cdp/Accessibility.js +30 -3
  90. package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  91. package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
  92. package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
  93. package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js +30 -0
  94. package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
  95. package/lib/cjs/puppeteer/cdp/Browser.d.ts +10 -5
  96. package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  97. package/lib/cjs/puppeteer/cdp/Browser.js +61 -8
  98. package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  99. package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  100. package/lib/cjs/puppeteer/cdp/BrowserConnector.js +4 -2
  101. package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
  102. package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +3 -2
  103. package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  104. package/lib/cjs/puppeteer/cdp/BrowserContext.js +4 -4
  105. package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
  106. package/lib/cjs/puppeteer/cdp/CdpSession.d.ts +1 -1
  107. package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
  108. package/lib/cjs/puppeteer/cdp/CdpSession.js +2 -1
  109. package/lib/cjs/puppeteer/cdp/CdpSession.js.map +1 -1
  110. package/lib/cjs/puppeteer/cdp/Connection.d.ts +6 -1
  111. package/lib/cjs/puppeteer/cdp/Connection.d.ts.map +1 -1
  112. package/lib/cjs/puppeteer/cdp/Connection.js +11 -2
  113. package/lib/cjs/puppeteer/cdp/Connection.js.map +1 -1
  114. package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +5 -64
  115. package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  116. package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +10 -76
  117. package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  118. package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts +1 -0
  119. package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  120. package/lib/cjs/puppeteer/cdp/EmulationManager.js +22 -0
  121. package/lib/cjs/puppeteer/cdp/EmulationManager.js.map +1 -1
  122. package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
  123. package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
  124. package/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
  125. package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
  126. package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
  127. package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
  128. package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
  129. package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
  130. package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +2 -2
  131. package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  132. package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
  133. package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
  134. package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  135. package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  136. package/lib/cjs/puppeteer/cdp/HTTPRequest.js +6 -2
  137. package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
  138. package/lib/cjs/puppeteer/cdp/HTTPResponse.js +1 -1
  139. package/lib/cjs/puppeteer/cdp/HTTPResponse.js.map +1 -1
  140. package/lib/cjs/puppeteer/cdp/JSHandle.js.map +1 -1
  141. package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts +1 -0
  142. package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
  143. package/lib/cjs/puppeteer/cdp/NetworkEventManager.js +8 -0
  144. package/lib/cjs/puppeteer/cdp/NetworkEventManager.js.map +1 -1
  145. package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  146. package/lib/cjs/puppeteer/cdp/NetworkManager.js +25 -1
  147. package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
  148. package/lib/cjs/puppeteer/cdp/Page.d.ts +9 -4
  149. package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  150. package/lib/cjs/puppeteer/cdp/Page.js +30 -7
  151. package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  152. package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
  153. package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  154. package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
  155. package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  156. package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
  157. package/lib/cjs/puppeteer/cdp/WebWorker.js +8 -3
  158. package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
  159. package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
  160. package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
  161. package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
  162. package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
  163. package/lib/cjs/puppeteer/cdp/utils.d.ts +2 -2
  164. package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
  165. package/lib/cjs/puppeteer/common/BrowserConnector.js +47 -3
  166. package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  167. package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +2 -0
  168. package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
  169. package/lib/cjs/puppeteer/common/CallbackRegistry.js +4 -3
  170. package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
  171. package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +22 -0
  172. package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  173. package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
  174. package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  175. package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
  176. package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
  177. package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
  178. package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  179. package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +4 -0
  180. package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  181. package/lib/cjs/puppeteer/node/BrowserLauncher.js +10 -4
  182. package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  183. package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +1 -1
  184. package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  185. package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -13
  186. package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  187. package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +5 -3
  188. package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  189. package/lib/cjs/puppeteer/node/LaunchOptions.js +17 -0
  190. package/lib/cjs/puppeteer/node/LaunchOptions.js.map +1 -1
  191. package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  192. package/lib/cjs/puppeteer/revisions.js +3 -3
  193. package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  194. package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
  195. package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
  196. package/lib/cjs/puppeteer/util/disposable.js +3 -1
  197. package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
  198. package/lib/cjs/puppeteer/util/util.d.ts +1 -0
  199. package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
  200. package/lib/cjs/puppeteer/util/util.js +1 -0
  201. package/lib/cjs/puppeteer/util/util.js.map +1 -1
  202. package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  203. package/lib/cjs/puppeteer/util/version.js +1 -1
  204. package/lib/es5-iife/puppeteer-core-browser.d.ts +304 -22
  205. package/lib/es5-iife/puppeteer-core-browser.js +484 -224
  206. package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts +96 -0
  207. package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
  208. package/lib/esm/puppeteer/api/BluetoothEmulation.js +7 -0
  209. package/lib/esm/puppeteer/api/BluetoothEmulation.js.map +1 -0
  210. package/lib/esm/puppeteer/api/Browser.d.ts +111 -2
  211. package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  212. package/lib/esm/puppeteer/api/Browser.js +4 -2
  213. package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  214. package/lib/esm/puppeteer/api/BrowserContext.d.ts +5 -3
  215. package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
  216. package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
  217. package/lib/esm/puppeteer/api/CDPSession.d.ts.map +1 -1
  218. package/lib/esm/puppeteer/api/CDPSession.js.map +1 -1
  219. package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +62 -0
  220. package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  221. package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +34 -0
  222. package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  223. package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  224. package/lib/esm/puppeteer/api/ElementHandle.js +1 -1
  225. package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  226. package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  227. package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  228. package/lib/esm/puppeteer/api/Frame.js +4 -4
  229. package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  230. package/lib/esm/puppeteer/api/HTTPRequest.d.ts +1 -1
  231. package/lib/esm/puppeteer/api/Input.d.ts +1 -1
  232. package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
  233. package/lib/esm/puppeteer/api/Page.d.ts +41 -7
  234. package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  235. package/lib/esm/puppeteer/api/Page.js.map +1 -1
  236. package/lib/esm/puppeteer/api/api.d.ts +2 -0
  237. package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
  238. package/lib/esm/puppeteer/api/api.js +1 -0
  239. package/lib/esm/puppeteer/api/api.js.map +1 -1
  240. package/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  241. package/lib/esm/puppeteer/bidi/BidiOverCdp.js +1 -1
  242. package/lib/esm/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  243. package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
  244. package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
  245. package/lib/esm/puppeteer/bidi/BluetoothEmulation.js +38 -0
  246. package/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
  247. package/lib/esm/puppeteer/bidi/Browser.d.ts +6 -1
  248. package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  249. package/lib/esm/puppeteer/bidi/Browser.js +36 -14
  250. package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  251. package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
  252. package/lib/esm/puppeteer/bidi/BrowserConnector.js +4 -3
  253. package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
  254. package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +3 -3
  255. package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  256. package/lib/esm/puppeteer/bidi/BrowserContext.js +6 -3
  257. package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
  258. package/lib/esm/puppeteer/bidi/Connection.d.ts +2 -1
  259. package/lib/esm/puppeteer/bidi/Connection.d.ts.map +1 -1
  260. package/lib/esm/puppeteer/bidi/Connection.js +19 -2
  261. package/lib/esm/puppeteer/bidi/Connection.js.map +1 -1
  262. package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
  263. package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
  264. package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js +85 -0
  265. package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
  266. package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -1
  267. package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  268. package/lib/esm/puppeteer/bidi/Frame.js +3 -2
  269. package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  270. package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +0 -1
  271. package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  272. package/lib/esm/puppeteer/bidi/HTTPRequest.js +2 -29
  273. package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  274. package/lib/esm/puppeteer/bidi/Page.d.ts +10 -8
  275. package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  276. package/lib/esm/puppeteer/bidi/Page.js +64 -48
  277. package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  278. package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +8 -0
  279. package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  280. package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +55 -2
  281. package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  282. package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map +1 -1
  283. package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
  284. package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  285. package/lib/esm/puppeteer/bidi/core/Request.d.ts +1 -0
  286. package/lib/esm/puppeteer/bidi/core/Request.d.ts.map +1 -1
  287. package/lib/esm/puppeteer/bidi/core/Request.js +31 -5
  288. package/lib/esm/puppeteer/bidi/core/Request.js.map +1 -1
  289. package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
  290. package/lib/esm/puppeteer/bidi/util.js +7 -0
  291. package/lib/esm/puppeteer/bidi/util.js.map +1 -1
  292. package/lib/esm/puppeteer/cdp/Accessibility.d.ts +10 -0
  293. package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  294. package/lib/esm/puppeteer/cdp/Accessibility.js +30 -3
  295. package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  296. package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
  297. package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
  298. package/lib/esm/puppeteer/cdp/BluetoothEmulation.js +26 -0
  299. package/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
  300. package/lib/esm/puppeteer/cdp/Browser.d.ts +10 -5
  301. package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  302. package/lib/esm/puppeteer/cdp/Browser.js +61 -8
  303. package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  304. package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  305. package/lib/esm/puppeteer/cdp/BrowserConnector.js +4 -2
  306. package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
  307. package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +3 -2
  308. package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  309. package/lib/esm/puppeteer/cdp/BrowserContext.js +4 -4
  310. package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
  311. package/lib/esm/puppeteer/cdp/CdpSession.d.ts +1 -1
  312. package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
  313. package/lib/esm/puppeteer/cdp/CdpSession.js +2 -1
  314. package/lib/esm/puppeteer/cdp/CdpSession.js.map +1 -1
  315. package/lib/esm/puppeteer/cdp/Connection.d.ts +6 -1
  316. package/lib/esm/puppeteer/cdp/Connection.d.ts.map +1 -1
  317. package/lib/esm/puppeteer/cdp/Connection.js +11 -2
  318. package/lib/esm/puppeteer/cdp/Connection.js.map +1 -1
  319. package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +5 -64
  320. package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  321. package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +7 -72
  322. package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  323. package/lib/esm/puppeteer/cdp/EmulationManager.d.ts +1 -0
  324. package/lib/esm/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  325. package/lib/esm/puppeteer/cdp/EmulationManager.js +22 -0
  326. package/lib/esm/puppeteer/cdp/EmulationManager.js.map +1 -1
  327. package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
  328. package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
  329. package/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
  330. package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
  331. package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
  332. package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
  333. package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
  334. package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
  335. package/lib/esm/puppeteer/cdp/FrameManager.d.ts +2 -2
  336. package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  337. package/lib/esm/puppeteer/cdp/FrameManager.js +2 -2
  338. package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
  339. package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  340. package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  341. package/lib/esm/puppeteer/cdp/HTTPRequest.js +6 -2
  342. package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
  343. package/lib/esm/puppeteer/cdp/HTTPResponse.js +1 -1
  344. package/lib/esm/puppeteer/cdp/HTTPResponse.js.map +1 -1
  345. package/lib/esm/puppeteer/cdp/JSHandle.js.map +1 -1
  346. package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts +1 -0
  347. package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
  348. package/lib/esm/puppeteer/cdp/NetworkEventManager.js +8 -0
  349. package/lib/esm/puppeteer/cdp/NetworkEventManager.js.map +1 -1
  350. package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  351. package/lib/esm/puppeteer/cdp/NetworkManager.js +25 -1
  352. package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
  353. package/lib/esm/puppeteer/cdp/Page.d.ts +9 -4
  354. package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  355. package/lib/esm/puppeteer/cdp/Page.js +30 -7
  356. package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  357. package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
  358. package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  359. package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
  360. package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  361. package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
  362. package/lib/esm/puppeteer/cdp/WebWorker.js +8 -3
  363. package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
  364. package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
  365. package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
  366. package/lib/esm/puppeteer/cdp/cdp.js +1 -0
  367. package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
  368. package/lib/esm/puppeteer/cdp/utils.d.ts +2 -2
  369. package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
  370. package/lib/esm/puppeteer/common/BrowserConnector.js +48 -4
  371. package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
  372. package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +2 -0
  373. package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
  374. package/lib/esm/puppeteer/common/CallbackRegistry.js +4 -3
  375. package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
  376. package/lib/esm/puppeteer/common/ConnectOptions.d.ts +22 -0
  377. package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  378. package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
  379. package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  380. package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
  381. package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
  382. package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
  383. package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +4 -0
  384. package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  385. package/lib/esm/puppeteer/node/BrowserLauncher.js +10 -4
  386. package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  387. package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +1 -1
  388. package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  389. package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -13
  390. package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  391. package/lib/esm/puppeteer/node/LaunchOptions.d.ts +5 -3
  392. package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  393. package/lib/esm/puppeteer/node/LaunchOptions.js +16 -1
  394. package/lib/esm/puppeteer/node/LaunchOptions.js.map +1 -1
  395. package/lib/esm/puppeteer/revisions.d.ts +3 -3
  396. package/lib/esm/puppeteer/revisions.js +3 -3
  397. package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
  398. package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
  399. package/lib/esm/puppeteer/util/disposable.js +2 -2
  400. package/lib/esm/puppeteer/util/disposable.js.map +1 -1
  401. package/lib/esm/puppeteer/util/util.d.ts +1 -0
  402. package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
  403. package/lib/esm/puppeteer/util/util.js +1 -0
  404. package/lib/esm/puppeteer/util/util.js.map +1 -1
  405. package/lib/esm/puppeteer/util/version.d.ts +1 -1
  406. package/lib/esm/puppeteer/util/version.js +1 -1
  407. package/lib/types.d.ts +304 -22
  408. package/package.json +15 -15
  409. package/src/api/BluetoothEmulation.ts +103 -0
  410. package/src/api/Browser.ts +130 -3
  411. package/src/api/BrowserContext.ts +10 -3
  412. package/src/api/CDPSession.ts +1 -2
  413. package/src/api/DeviceRequestPrompt.ts +71 -0
  414. package/src/api/ElementHandle.ts +3 -5
  415. package/src/api/Frame.ts +7 -9
  416. package/src/api/HTTPRequest.ts +1 -1
  417. package/src/api/Page.ts +48 -11
  418. package/src/api/api.ts +2 -0
  419. package/src/bidi/BidiOverCdp.ts +1 -0
  420. package/src/bidi/BluetoothEmulation.ts +52 -0
  421. package/src/bidi/Browser.ts +52 -14
  422. package/src/bidi/BrowserConnector.ts +8 -1
  423. package/src/bidi/BrowserContext.ts +9 -6
  424. package/src/bidi/Connection.ts +20 -1
  425. package/src/bidi/DeviceRequestPrompt.ts +138 -0
  426. package/src/bidi/Frame.ts +7 -3
  427. package/src/bidi/HTTPRequest.ts +2 -45
  428. package/src/bidi/Page.ts +86 -71
  429. package/src/bidi/core/BrowsingContext.ts +80 -2
  430. package/src/bidi/core/Connection.ts +3 -2
  431. package/src/bidi/core/Request.ts +35 -5
  432. package/src/bidi/util.ts +8 -0
  433. package/src/cdp/Accessibility.ts +45 -4
  434. package/src/cdp/BluetoothEmulation.ts +47 -0
  435. package/src/cdp/Browser.ts +95 -10
  436. package/src/cdp/BrowserConnector.ts +4 -0
  437. package/src/cdp/BrowserContext.ts +5 -4
  438. package/src/cdp/CdpSession.ts +3 -2
  439. package/src/cdp/Connection.ts +15 -1
  440. package/src/cdp/DeviceRequestPrompt.ts +8 -79
  441. package/src/cdp/EmulationManager.ts +30 -0
  442. package/src/cdp/ExecutionContext.ts +6 -2
  443. package/src/cdp/ExtensionTransport.ts +5 -1
  444. package/src/cdp/Frame.ts +3 -5
  445. package/src/cdp/FrameManager.ts +9 -4
  446. package/src/cdp/HTTPRequest.ts +7 -2
  447. package/src/cdp/HTTPResponse.ts +1 -1
  448. package/src/cdp/JSHandle.ts +1 -1
  449. package/src/cdp/NetworkEventManager.ts +16 -1
  450. package/src/cdp/NetworkManager.ts +31 -1
  451. package/src/cdp/Page.ts +49 -14
  452. package/src/cdp/TargetManager.ts +36 -43
  453. package/src/cdp/WebWorker.ts +8 -3
  454. package/src/cdp/cdp.ts +1 -0
  455. package/src/cdp/utils.ts +2 -2
  456. package/src/common/BrowserConnector.ts +67 -4
  457. package/src/common/CallbackRegistry.ts +7 -5
  458. package/src/common/ConnectOptions.ts +28 -0
  459. package/src/common/ConsoleMessage.ts +14 -0
  460. package/src/common/EventEmitter.ts +3 -3
  461. package/src/node/BrowserLauncher.ts +22 -1
  462. package/src/node/ChromeLauncher.ts +5 -17
  463. package/src/node/LaunchOptions.ts +23 -7
  464. package/src/revisions.ts +3 -3
  465. package/src/util/disposable.ts +2 -2
  466. package/src/util/util.ts +1 -0
  467. package/src/util/version.ts +1 -1
  468. package/src/templates/version.ts.tmpl +0 -4
@@ -91,6 +91,33 @@ export declare interface ActionOptions {
91
91
  */
92
92
  export declare type ActionResult = 'continue' | 'abort' | 'respond';
93
93
 
94
+ /**
95
+ * @license
96
+ * Copyright 2025 Google Inc.
97
+ * SPDX-License-Identifier: Apache-2.0
98
+ */
99
+ /**
100
+ * @public
101
+ * Emulated bluetooth adapter state.
102
+ */
103
+ export declare type AdapterState = 'absent' | 'powered-off' | 'powered-on';
104
+
105
+ /**
106
+ * @public
107
+ */
108
+ export declare interface AddScreenParams {
109
+ left: number;
110
+ top: number;
111
+ width: number;
112
+ height: number;
113
+ workAreaInsets?: WorkAreaInsets;
114
+ devicePixelRatio?: number;
115
+ rotation?: number;
116
+ colorDepth?: number;
117
+ label?: string;
118
+ isInternal?: boolean;
119
+ }
120
+
94
121
  /**
95
122
  * @public
96
123
  */
@@ -127,6 +154,83 @@ export declare type AwaitablePredicate<T> = (value: T) => Awaitable<boolean>;
127
154
  */
128
155
  export declare type AwaitedLocator<T> = T extends Locator<infer S> ? S : never;
129
156
 
157
+ /**
158
+ * Exposes the bluetooth emulation abilities.
159
+ *
160
+ * @remarks {@link https://webbluetoothcg.github.io/web-bluetooth/#simulated-bluetooth-adapter|Web Bluetooth specification}
161
+ * requires the emulated adapters should be isolated per top-level navigable. However,
162
+ * at the moment Chromium's bluetooth emulation implementation is tight to the browser
163
+ * context, not the page. This means the bluetooth emulation exposed from different pages
164
+ * of the same browser context would interfere their states.
165
+ *
166
+ * @example
167
+ *
168
+ * ```ts
169
+ * await page.bluetooth.emulateAdapter('powered-on');
170
+ * await page.bluetooth.simulatePreconnectedPeripheral({
171
+ * address: '09:09:09:09:09:09',
172
+ * name: 'SOME_NAME',
173
+ * manufacturerData: [
174
+ * {
175
+ * key: 17,
176
+ * data: 'AP8BAX8=',
177
+ * },
178
+ * ],
179
+ * knownServiceUuids: ['12345678-1234-5678-9abc-def123456789'],
180
+ * });
181
+ * await page.bluetooth.disableEmulation();
182
+ * ```
183
+ *
184
+ * @experimental
185
+ * @public
186
+ */
187
+ export declare interface BluetoothEmulation {
188
+ /**
189
+ * Emulate Bluetooth adapter. Required for bluetooth simulations
190
+ * See {@link https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-simulateAdapter-command|bluetooth.simulateAdapter}.
191
+ *
192
+ * @param state - The desired bluetooth adapter state.
193
+ * @param leSupported - Mark if the adapter supports low-energy bluetooth.
194
+ *
195
+ * @experimental
196
+ * @public
197
+ */
198
+ emulateAdapter(state: AdapterState, leSupported?: boolean): Promise<void>;
199
+ /**
200
+ * Disable emulated bluetooth adapter.
201
+ * See {@link https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-disableSimulation-command|bluetooth.disableSimulation}.
202
+ *
203
+ * @experimental
204
+ * @public
205
+ */
206
+ disableEmulation(): Promise<void>;
207
+ /**
208
+ * Simulated preconnected Bluetooth Peripheral.
209
+ * See {@link https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-simulateconnectedperipheral-command|bluetooth.simulatePreconnectedPeripheral}.
210
+ *
211
+ * @param preconnectedPeripheral - The peripheral to simulate.
212
+ *
213
+ * @experimental
214
+ * @public
215
+ */
216
+ simulatePreconnectedPeripheral(preconnectedPeripheral: PreconnectedPeripheral): Promise<void>;
217
+ }
218
+
219
+ /**
220
+ * @public
221
+ * Represents the simulated bluetooth peripheral's manufacturer data.
222
+ */
223
+ export declare interface BluetoothManufacturerData {
224
+ /**
225
+ * The company identifier, as defined by the {@link https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/|Bluetooth SIG}.
226
+ */
227
+ key: number;
228
+ /**
229
+ * The manufacturer-specific data as a base64-encoded string.
230
+ */
231
+ data: string;
232
+ }
233
+
130
234
  /**
131
235
  * @public
132
236
  */
@@ -254,7 +358,15 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
254
358
  * Creates a new {@link Page | page} in the
255
359
  * {@link Browser.defaultBrowserContext | default browser context}.
256
360
  */
257
- abstract newPage(): Promise<Page>;
361
+ abstract newPage(options?: CreatePageOptions): Promise<Page>;
362
+ /**
363
+ * Gets the specified window {@link WindowBounds | bounds}.
364
+ */
365
+ abstract getWindowBounds(windowId: WindowId): Promise<WindowBounds>;
366
+ /**
367
+ * Sets the specified window {@link WindowBounds | bounds}.
368
+ */
369
+ abstract setWindowBounds(windowId: WindowId, windowBounds: WindowBounds): Promise<void>;
258
370
  /**
259
371
  * Gets all active {@link Target | targets}.
260
372
  *
@@ -291,10 +403,12 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
291
403
  * returns all {@link Page | pages} in all
292
404
  * {@link BrowserContext | browser contexts}.
293
405
  *
406
+ * @param includeAll - experimental, setting to true includes all kinds of pages.
407
+ *
294
408
  * @remarks Non-visible {@link Page | pages}, such as `"background_page"`,
295
409
  * will not be listed here. You can find them using {@link Target.page}.
296
410
  */
297
- pages(): Promise<Page[]>;
411
+ pages(includeAll?: boolean): Promise<Page[]>;
298
412
  /**
299
413
  * Gets a string representing this {@link Browser | browser's} name and
300
414
  * version.
@@ -375,6 +489,26 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
375
489
  * `--enable-unsafe-extension-debugging` flag is set.
376
490
  */
377
491
  abstract uninstallExtension(id: string): Promise<void>;
492
+ /**
493
+ * Gets a list of {@link ScreenInfo | screen information objects}.
494
+ */
495
+ abstract screens(): Promise<ScreenInfo[]>;
496
+ /**
497
+ * Adds a new screen, returns the added {@link ScreenInfo | screen information object}.
498
+ *
499
+ * @remarks
500
+ *
501
+ * Only supported in headless mode.
502
+ */
503
+ abstract addScreen(params: AddScreenParams): Promise<ScreenInfo>;
504
+ /**
505
+ * Removes a screen.
506
+ *
507
+ * @remarks
508
+ *
509
+ * Only supported in headless mode. Fails if the primary screen id is specified.
510
+ */
511
+ abstract removeScreen(screenId: string): Promise<void>;
378
512
  /**
379
513
  * Whether Puppeteer is connected to this {@link Browser | browser}.
380
514
  *
@@ -470,10 +604,12 @@ export declare abstract class BrowserContext extends EventEmitter<BrowserContext
470
604
  * Gets a list of all open {@link Page | pages} inside this
471
605
  * {@link BrowserContext | browser context}.
472
606
  *
607
+ * @param includeAll - experimental, setting to true includes all kinds of pages.
608
+ *
473
609
  * @remarks Non-visible {@link Page | pages}, such as `"background_page"`,
474
610
  * will not be listed here. You can find them using {@link Target.page}.
475
611
  */
476
- abstract pages(): Promise<Page[]>;
612
+ abstract pages(includeAll?: boolean): Promise<Page[]>;
477
613
  /**
478
614
  * Grants this {@link BrowserContext | browser context} the given
479
615
  * `permissions` within the given `origin`.
@@ -513,7 +649,7 @@ export declare abstract class BrowserContext extends EventEmitter<BrowserContext
513
649
  * Creates a new {@link Page | page} in this
514
650
  * {@link BrowserContext | browser context}.
515
651
  */
516
- abstract newPage(): Promise<Page>;
652
+ abstract newPage(options?: CreatePageOptions): Promise<Page>;
517
653
  /**
518
654
  * Gets the {@link Browser | browser} associated with this
519
655
  * {@link BrowserContext | browser context}.
@@ -984,13 +1120,14 @@ connect: (options: Puppeteer_2.ConnectOptions) => Promise<Puppeteer_2.Browser>;
984
1120
  */
985
1121
  export declare class Connection extends EventEmitter<CDPSessionEvents> {
986
1122
 
987
- constructor(url: string, transport: ConnectionTransport, delay?: number, timeout?: number, rawErrors?: boolean);
1123
+ constructor(url: string, transport: ConnectionTransport, delay?: number, timeout?: number, rawErrors?: boolean, idGenerator?: () => number);
988
1124
  static fromSession(session: CDPSession): Connection | undefined;
989
1125
 
990
1126
  get timeout(): number;
991
1127
 
992
1128
 
993
1129
 
1130
+
994
1131
  /**
995
1132
  * @param sessionId - The session id
996
1133
  * @returns The current CDP session if it exists
@@ -1046,6 +1183,17 @@ export declare interface ConnectOptions {
1046
1183
  * @defaultValue `false`
1047
1184
  */
1048
1185
  acceptInsecureCerts?: boolean;
1186
+ /**
1187
+ * If specified, puppeteer looks for an open WebSocket at the well-known
1188
+ * default user data directory for the specified channel and attempts to
1189
+ * connect to it using ws://localhost:$ActivePort/devtools/browser. Only works
1190
+ * for Chrome and when run in Node.js.
1191
+ *
1192
+ * This option is experimental when used with puppeteer.connect().
1193
+ *
1194
+ * @experimental
1195
+ */
1196
+ channel?: ChromeReleaseChannel;
1049
1197
  /**
1050
1198
  * Experimental setting to disable monitoring network events by default. When
1051
1199
  * set to `false`, parts of Puppeteer that depend on network events would not
@@ -1103,6 +1251,7 @@ export declare interface ConnectOptions {
1103
1251
  browserWSEndpoint?: string;
1104
1252
  browserURL?: string;
1105
1253
  transport?: ConnectionTransport;
1254
+
1106
1255
  /**
1107
1256
  * Headers to use for the web socket connection.
1108
1257
  * @remarks
@@ -1145,6 +1294,7 @@ export declare class ConsoleMessage {
1145
1294
  * The array of locations on the stack of the console message.
1146
1295
  */
1147
1296
  stackTrace(): ConsoleMessageLocation[];
1297
+
1148
1298
  }
1149
1299
 
1150
1300
  /**
@@ -1497,6 +1647,16 @@ export declare interface CoverageEntry {
1497
1647
  }>;
1498
1648
  }
1499
1649
 
1650
+ /**
1651
+ * @public
1652
+ */
1653
+ export declare type CreatePageOptions = {
1654
+ type: 'tab';
1655
+ } | {
1656
+ type: 'window';
1657
+ windowBounds?: WindowBounds;
1658
+ };
1659
+
1500
1660
  /**
1501
1661
  * @public
1502
1662
  */
@@ -1656,25 +1816,23 @@ export declare interface Device {
1656
1816
  *
1657
1817
  * @public
1658
1818
  */
1659
- export declare class DeviceRequestPrompt {
1660
-
1819
+ export declare abstract class DeviceRequestPrompt {
1661
1820
  /**
1662
1821
  * Current list of selectable devices.
1663
1822
  */
1664
- devices: DeviceRequestPromptDevice[];
1665
-
1823
+ readonly devices: DeviceRequestPromptDevice[];
1666
1824
  /**
1667
1825
  * Resolve to the first device in the prompt matching a filter.
1668
1826
  */
1669
- waitForDevice(filter: (device: DeviceRequestPromptDevice) => boolean, options?: WaitTimeoutOptions): Promise<DeviceRequestPromptDevice>;
1827
+ abstract waitForDevice(filter: (device: DeviceRequestPromptDevice) => boolean, options?: WaitTimeoutOptions): Promise<DeviceRequestPromptDevice>;
1670
1828
  /**
1671
1829
  * Select a device in the prompt's list.
1672
1830
  */
1673
- select(device: DeviceRequestPromptDevice): Promise<void>;
1831
+ abstract select(device: DeviceRequestPromptDevice): Promise<void>;
1674
1832
  /**
1675
1833
  * Cancel the prompt.
1676
1834
  */
1677
- cancel(): Promise<void>;
1835
+ abstract cancel(): Promise<void>;
1678
1836
  }
1679
1837
 
1680
1838
  /**
@@ -1682,7 +1840,7 @@ export declare class DeviceRequestPrompt {
1682
1840
  *
1683
1841
  * @public
1684
1842
  */
1685
- export declare class DeviceRequestPromptDevice {
1843
+ export declare interface DeviceRequestPromptDevice {
1686
1844
  /**
1687
1845
  * Device id during a prompt.
1688
1846
  */
@@ -1691,7 +1849,6 @@ export declare class DeviceRequestPromptDevice {
1691
1849
  * Device name as it appears in a prompt.
1692
1850
  */
1693
1851
  name: string;
1694
-
1695
1852
  }
1696
1853
 
1697
1854
  /**
@@ -3302,7 +3459,7 @@ export declare abstract class HTTPRequest {
3302
3459
  */
3303
3460
  abstract method(): string;
3304
3461
  /**
3305
- * The request's post body, if any.
3462
+ * @deprecated Use {@link HTTPRequest.fetchPostData}.
3306
3463
  */
3307
3464
  abstract postData(): string | undefined;
3308
3465
  /**
@@ -5449,7 +5606,7 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
5449
5606
  * multiple redirects, the navigation will resolve with the response of the
5450
5607
  * last redirect.
5451
5608
  */
5452
- abstract reload(options?: WaitForOptions): Promise<HTTPResponse | null>;
5609
+ abstract reload(options?: ReloadOptions): Promise<HTTPResponse | null>;
5453
5610
  /**
5454
5611
  * Waits for the page to navigate to a new URL or to reload. It is useful when
5455
5612
  * you run code that will indirectly cause the page to navigate.
@@ -5976,6 +6133,12 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
5976
6133
  encoding: 'base64';
5977
6134
  }): Promise<string>;
5978
6135
  screenshot(options?: Readonly<ScreenshotOptions>): Promise<Uint8Array>;
6136
+ /**
6137
+ * Emulates focus state of the page.
6138
+ *
6139
+ * @param enabled - Whether to emulate focus.
6140
+ */
6141
+ abstract emulateFocusedPage(enabled: boolean): Promise<void>;
5979
6142
 
5980
6143
  /**
5981
6144
  * Generates a PDF of the page with the `print` CSS media type.
@@ -6367,8 +6530,23 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
6367
6530
  */
6368
6531
  abstract waitForDevicePrompt(options?: WaitTimeoutOptions): Promise<DeviceRequestPrompt>;
6369
6532
 
6533
+ /**
6534
+ * Returns the page's window id.
6535
+ *
6536
+ * @experimental
6537
+ */
6538
+ abstract windowId(): Promise<WindowId>;
6370
6539
 
6371
6540
 
6541
+ /**
6542
+ * Opens DevTools for the current Page and returns the DevTools Page. This
6543
+ * method is only available in Chrome.
6544
+ */
6545
+ abstract openDevTools(): Promise<Page>;
6546
+ /**
6547
+ * {@inheritDoc BluetoothEmulation}
6548
+ */
6549
+ abstract get bluetooth(): BluetoothEmulation;
6372
6550
  }
6373
6551
 
6374
6552
  /**
@@ -6447,7 +6625,7 @@ export declare const enum PageEvent {
6447
6625
  Metrics = "metrics",
6448
6626
  /**
6449
6627
  * Emitted when an uncaught exception happens within the page. Contains an
6450
- * `Error`.
6628
+ * `Error` or data of type unknown.
6451
6629
  */
6452
6630
  PageError = "pageerror",
6453
6631
  /**
@@ -6545,7 +6723,7 @@ export declare interface PageEvents extends Record<EventType, unknown> {
6545
6723
  title: string;
6546
6724
  metrics: Metrics;
6547
6725
  };
6548
- [PageEvent.PageError]: Error;
6726
+ [PageEvent.PageError]: Error | unknown;
6549
6727
  [PageEvent.Popup]: Page | null;
6550
6728
  [PageEvent.Request]: HTTPRequest;
6551
6729
  [PageEvent.Response]: HTTPResponse;
@@ -6745,6 +6923,17 @@ declare namespace PQuerySelector {
6745
6923
  }
6746
6924
  }
6747
6925
 
6926
+ /**
6927
+ * @public
6928
+ * A bluetooth peripheral to be simulated.
6929
+ */
6930
+ export declare interface PreconnectedPeripheral {
6931
+ address: string;
6932
+ name: string;
6933
+ manufacturerData: BluetoothManufacturerData[];
6934
+ knownServiceUuids: string[];
6935
+ }
6936
+
6748
6937
  /**
6749
6938
  * A list of pre-defined network conditions to be used with
6750
6939
  * {@link Page.emulateNetworkConditions}.
@@ -6888,6 +7077,10 @@ declare namespace Puppeteer_2 {
6888
7077
  export {
6889
7078
  Protocol,
6890
7079
  Session,
7080
+ AdapterState,
7081
+ BluetoothManufacturerData,
7082
+ PreconnectedPeripheral,
7083
+ BluetoothEmulation,
6891
7084
  BrowserContextOptions,
6892
7085
  TargetFilterCallback,
6893
7086
  Permission,
@@ -6895,6 +7088,14 @@ declare namespace Puppeteer_2 {
6895
7088
  BrowserEvent,
6896
7089
  BrowserEvents,
6897
7090
  DebugInfo,
7091
+ WindowState,
7092
+ WindowBounds,
7093
+ WindowId,
7094
+ CreatePageOptions,
7095
+ ScreenOrientation_2 as ScreenOrientation,
7096
+ ScreenInfo,
7097
+ WorkAreaInsets,
7098
+ AddScreenParams,
6898
7099
  Browser,
6899
7100
  BrowserContextEvent,
6900
7101
  BrowserContextEvents,
@@ -6904,6 +7105,8 @@ declare namespace Puppeteer_2 {
6904
7105
  CDPSessionEvents,
6905
7106
  CommandOptions,
6906
7107
  CDPSession,
7108
+ DeviceRequestPromptDevice,
7109
+ DeviceRequestPrompt,
6907
7110
  Dialog,
6908
7111
  Quad,
6909
7112
  BoxModel,
@@ -6961,6 +7164,7 @@ declare namespace Puppeteer_2 {
6961
7164
  PageEvent,
6962
7165
  PageEvents,
6963
7166
  NewDocumentScriptEvaluation,
7167
+ ReloadOptions,
6964
7168
  Page,
6965
7169
  TargetType,
6966
7170
  Target,
@@ -6986,8 +7190,6 @@ declare namespace Puppeteer_2 {
6986
7190
  Coverage,
6987
7191
  JSCoverage,
6988
7192
  CSSCoverage,
6989
- DeviceRequestPromptDevice,
6990
- DeviceRequestPrompt,
6991
7193
  ExtensionTransport,
6992
7194
  PuppeteerLifeCycleEvent,
6993
7195
  ProtocolLifeCycleEvent,
@@ -7005,6 +7207,7 @@ declare namespace Puppeteer_2 {
7005
7207
  ProtocolType,
7006
7208
  SupportedWebDriverCapability,
7007
7209
  SupportedWebDriverCapabilities,
7210
+ ChromeReleaseChannel,
7008
7211
  ConnectOptions,
7009
7212
  ConsoleMessageLocation,
7010
7213
  ConsoleMessageType,
@@ -7055,7 +7258,6 @@ declare namespace Puppeteer_2 {
7055
7258
  Viewport,
7056
7259
  DownloadPolicy,
7057
7260
  DownloadBehavior,
7058
- ChromeReleaseChannel,
7059
7261
  LaunchOptions,
7060
7262
  BrowserLauncher,
7061
7263
  PuppeteerNode,
@@ -7259,6 +7461,19 @@ export declare interface QueryOptions {
7259
7461
  isolate: boolean;
7260
7462
  }
7261
7463
 
7464
+ /**
7465
+ * @public
7466
+ */
7467
+ export declare interface ReloadOptions extends WaitForOptions {
7468
+ /**
7469
+ * If set to true, the browser caches are ignored for the page reload.
7470
+ *
7471
+ * @defaultValue true
7472
+ * @public
7473
+ */
7474
+ ignoreCache?: boolean;
7475
+ }
7476
+
7262
7477
  /**
7263
7478
  * @public
7264
7479
  */
@@ -7385,6 +7600,37 @@ export declare interface ScreencastOptions {
7385
7600
  ffmpegPath?: string;
7386
7601
  }
7387
7602
 
7603
+ /**
7604
+ * @public
7605
+ */
7606
+ export declare interface ScreenInfo {
7607
+ left: number;
7608
+ top: number;
7609
+ width: number;
7610
+ height: number;
7611
+ availLeft: number;
7612
+ availTop: number;
7613
+ availWidth: number;
7614
+ availHeight: number;
7615
+ devicePixelRatio: number;
7616
+ colorDepth: number;
7617
+ orientation: ScreenOrientation_2;
7618
+ isExtended: boolean;
7619
+ isInternal: boolean;
7620
+ isPrimary: boolean;
7621
+ label: string;
7622
+ id: string;
7623
+ }
7624
+
7625
+ /**
7626
+ * @public
7627
+ */
7628
+ declare interface ScreenOrientation_2 {
7629
+ angle: number;
7630
+ type: string;
7631
+ }
7632
+ export { ScreenOrientation_2 as ScreenOrientation }
7633
+
7388
7634
  /**
7389
7635
  * @public
7390
7636
  */
@@ -7450,7 +7696,7 @@ export declare interface ScreenshotOptions {
7450
7696
  * relative to current working directory. If no path is provided, the image
7451
7697
  * won't be saved to the disk.
7452
7698
  */
7453
- path?: `${string}.${ImageFormat}`;
7699
+ path?: string;
7454
7700
  /**
7455
7701
  * Specifies the region of the page/element to clip.
7456
7702
  */
@@ -7573,10 +7819,15 @@ export declare interface SerializedAXNode {
7573
7819
  */
7574
7820
  invalid?: string;
7575
7821
  orientation?: string;
7822
+ /**
7823
+ * Url for link elements.
7824
+ */
7825
+ url?: string;
7576
7826
  /**
7577
7827
  * Children of this node, if there are any.
7578
7828
  */
7579
7829
  children?: SerializedAXNode[];
7830
+
7580
7831
  /**
7581
7832
  * Get an ElementHandle for this AXNode if available.
7582
7833
  *
@@ -8102,4 +8353,35 @@ export declare abstract class WebWorker extends EventEmitter<Record<EventType, u
8102
8353
  close(): Promise<void>;
8103
8354
  }
8104
8355
 
8356
+ /**
8357
+ * @public
8358
+ */
8359
+ export declare interface WindowBounds {
8360
+ left?: number;
8361
+ top?: number;
8362
+ width?: number;
8363
+ height?: number;
8364
+ windowState?: WindowState;
8365
+ }
8366
+
8367
+ /**
8368
+ * @public
8369
+ */
8370
+ export declare type WindowId = string;
8371
+
8372
+ /**
8373
+ * @public
8374
+ */
8375
+ export declare type WindowState = 'normal' | 'minimized' | 'maximized' | 'fullscreen';
8376
+
8377
+ /**
8378
+ * @public
8379
+ */
8380
+ export declare interface WorkAreaInsets {
8381
+ top?: number;
8382
+ left?: number;
8383
+ bottom?: number;
8384
+ right?: number;
8385
+ }
8386
+
8105
8387
  export { }