brave-real-puppeteer-core 24.26.1 → 24.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/advanced-stealth.js +1 -1
- package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/lib/cjs/puppeteer/api/BluetoothEmulation.js +8 -0
- package/lib/cjs/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/lib/cjs/puppeteer/api/Browser.d.ts +111 -2
- package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/Browser.js +4 -2
- package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/lib/cjs/puppeteer/api/BrowserContext.d.ts +5 -3
- package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/lib/cjs/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/CDPSession.js.map +1 -1
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +62 -0
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +38 -0
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/lib/cjs/puppeteer/api/Page.d.ts +39 -5
- package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/lib/cjs/puppeteer/api/api.d.ts +2 -0
- package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/api.js +1 -0
- package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js +42 -0
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/lib/cjs/puppeteer/bidi/Browser.d.ts +6 -1
- package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Browser.js +16 -0
- package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserConnector.js +4 -3
- package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +3 -3
- package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserContext.js +6 -3
- package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/Connection.d.ts +2 -1
- package/lib/cjs/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Connection.js +3 -2
- package/lib/cjs/puppeteer/bidi/Connection.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js +90 -0
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -1
- package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Frame.js +3 -2
- package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +0 -1
- package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/HTTPRequest.js +0 -25
- package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/Page.d.ts +10 -8
- package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Page.js +63 -47
- package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +8 -0
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +55 -2
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/Connection.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/util.js +7 -0
- package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Accessibility.js +11 -3
- package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js +30 -0
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/lib/cjs/puppeteer/cdp/Browser.d.ts +10 -5
- package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Browser.js +61 -8
- package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserConnector.js +4 -2
- package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +3 -2
- package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserContext.js +4 -4
- package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.js +2 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Connection.d.ts +6 -1
- package/lib/cjs/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Connection.js +11 -2
- package/lib/cjs/puppeteer/cdp/Connection.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +5 -64
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +10 -76
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/EmulationManager.js +22 -0
- package/lib/cjs/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
- package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/HTTPRequest.js +4 -1
- package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.js +8 -0
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkManager.js +25 -1
- package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Page.d.ts +9 -4
- package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Page.js +29 -6
- package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
- package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/WebWorker.js +8 -3
- package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
- package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
- package/lib/cjs/puppeteer/common/BrowserConnector.js +47 -3
- package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/CallbackRegistry.js +4 -3
- package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +22 -0
- package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/lib/cjs/puppeteer/node/BrowserLauncher.js +10 -4
- package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -13
- package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/lib/cjs/puppeteer/node/LaunchOptions.js +17 -0
- package/lib/cjs/puppeteer/node/LaunchOptions.js.map +1 -1
- package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/lib/cjs/puppeteer/revisions.js +3 -3
- package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
- package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
- package/lib/cjs/puppeteer/util/disposable.js +3 -1
- package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
- package/lib/cjs/puppeteer/util/util.d.ts +1 -0
- package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
- package/lib/cjs/puppeteer/util/util.js +1 -0
- package/lib/cjs/puppeteer/util/util.js.map +1 -1
- package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/lib/cjs/puppeteer/util/version.js +1 -1
- package/lib/es5-iife/puppeteer-core-browser.d.ts +297 -19
- package/lib/es5-iife/puppeteer-core-browser.js +456 -215
- package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/lib/esm/puppeteer/api/BluetoothEmulation.js +7 -0
- package/lib/esm/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/lib/esm/puppeteer/api/Browser.d.ts +111 -2
- package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Browser.js +4 -2
- package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/lib/esm/puppeteer/api/BrowserContext.d.ts +5 -3
- package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/lib/esm/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/CDPSession.js.map +1 -1
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +62 -0
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +34 -0
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/lib/esm/puppeteer/api/Input.d.ts +1 -1
- package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Page.d.ts +39 -5
- package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/lib/esm/puppeteer/api/api.d.ts +2 -0
- package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/api.js +1 -0
- package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/lib/esm/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.js +38 -0
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/lib/esm/puppeteer/bidi/Browser.d.ts +6 -1
- package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Browser.js +16 -0
- package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserConnector.js +4 -3
- package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +3 -3
- package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserContext.js +6 -3
- package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/lib/esm/puppeteer/bidi/Connection.d.ts +2 -1
- package/lib/esm/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Connection.js +3 -2
- package/lib/esm/puppeteer/bidi/Connection.js.map +1 -1
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js +85 -0
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -1
- package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Frame.js +3 -2
- package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +0 -1
- package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/HTTPRequest.js +0 -25
- package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/lib/esm/puppeteer/bidi/Page.d.ts +10 -8
- package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Page.js +64 -48
- package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +8 -0
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +55 -2
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/util.js +7 -0
- package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Accessibility.js +11 -3
- package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.js +26 -0
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/lib/esm/puppeteer/cdp/Browser.d.ts +10 -5
- package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Browser.js +61 -8
- package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserConnector.js +4 -2
- package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +3 -2
- package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserContext.js +4 -4
- package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/lib/esm/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/CdpSession.js +2 -1
- package/lib/esm/puppeteer/cdp/CdpSession.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Connection.d.ts +6 -1
- package/lib/esm/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Connection.js +11 -2
- package/lib/esm/puppeteer/cdp/Connection.js.map +1 -1
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +5 -64
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +7 -72
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/lib/esm/puppeteer/cdp/EmulationManager.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/EmulationManager.js +22 -0
- package/lib/esm/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/lib/esm/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/FrameManager.js +2 -2
- package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/HTTPRequest.js +4 -1
- package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkEventManager.js +8 -0
- package/lib/esm/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkManager.js +25 -1
- package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Page.d.ts +9 -4
- package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Page.js +29 -6
- package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
- package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/WebWorker.js +8 -3
- package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/cdp.js +1 -0
- package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
- package/lib/esm/puppeteer/common/BrowserConnector.js +48 -4
- package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/CallbackRegistry.js +4 -3
- package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/lib/esm/puppeteer/common/ConnectOptions.d.ts +22 -0
- package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/BrowserLauncher.js +10 -4
- package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -13
- package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/lib/esm/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/LaunchOptions.js +16 -1
- package/lib/esm/puppeteer/node/LaunchOptions.js.map +1 -1
- package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/lib/esm/puppeteer/revisions.js +3 -3
- package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
- package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
- package/lib/esm/puppeteer/util/disposable.js +2 -2
- package/lib/esm/puppeteer/util/disposable.js.map +1 -1
- package/lib/esm/puppeteer/util/util.d.ts +1 -0
- package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
- package/lib/esm/puppeteer/util/util.js +1 -0
- package/lib/esm/puppeteer/util/util.js.map +1 -1
- package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/lib/esm/puppeteer/util/version.js +1 -1
- package/lib/types.d.ts +297 -19
- package/package.json +15 -15
- package/src/api/BluetoothEmulation.ts +103 -0
- package/src/api/Browser.ts +130 -3
- package/src/api/BrowserContext.ts +10 -3
- package/src/api/CDPSession.ts +1 -2
- package/src/api/DeviceRequestPrompt.ts +71 -0
- package/src/api/ElementHandle.ts +2 -4
- package/src/api/Frame.ts +3 -5
- package/src/api/Page.ts +46 -9
- package/src/api/api.ts +2 -0
- package/src/bidi/BidiOverCdp.ts +1 -0
- package/src/bidi/BluetoothEmulation.ts +52 -0
- package/src/bidi/Browser.ts +28 -0
- package/src/bidi/BrowserConnector.ts +8 -1
- package/src/bidi/BrowserContext.ts +9 -6
- package/src/bidi/Connection.ts +4 -1
- package/src/bidi/DeviceRequestPrompt.ts +138 -0
- package/src/bidi/Frame.ts +7 -3
- package/src/bidi/HTTPRequest.ts +0 -41
- package/src/bidi/Page.ts +86 -71
- package/src/bidi/core/BrowsingContext.ts +80 -2
- package/src/bidi/core/Connection.ts +3 -2
- package/src/bidi/util.ts +8 -0
- package/src/cdp/Accessibility.ts +17 -3
- package/src/cdp/BluetoothEmulation.ts +47 -0
- package/src/cdp/Browser.ts +95 -10
- package/src/cdp/BrowserConnector.ts +4 -0
- package/src/cdp/BrowserContext.ts +5 -4
- package/src/cdp/CdpSession.ts +3 -2
- package/src/cdp/Connection.ts +15 -1
- package/src/cdp/DeviceRequestPrompt.ts +8 -79
- package/src/cdp/EmulationManager.ts +30 -0
- package/src/cdp/ExtensionTransport.ts +5 -1
- package/src/cdp/Frame.ts +3 -5
- package/src/cdp/FrameManager.ts +9 -4
- package/src/cdp/HTTPRequest.ts +5 -1
- package/src/cdp/NetworkEventManager.ts +16 -1
- package/src/cdp/NetworkManager.ts +31 -1
- package/src/cdp/Page.ts +48 -13
- package/src/cdp/TargetManager.ts +36 -43
- package/src/cdp/WebWorker.ts +8 -3
- package/src/cdp/cdp.ts +1 -0
- package/src/common/BrowserConnector.ts +67 -4
- package/src/common/CallbackRegistry.ts +7 -5
- package/src/common/ConnectOptions.ts +28 -0
- package/src/common/ConsoleMessage.ts +14 -0
- package/src/common/EventEmitter.ts +3 -3
- package/src/node/BrowserLauncher.ts +22 -1
- package/src/node/ChromeLauncher.ts +5 -17
- package/src/node/LaunchOptions.ts +23 -7
- package/src/revisions.ts +3 -3
- package/src/util/disposable.ts +2 -2
- package/src/util/util.ts +1 -0
- package/src/util/version.ts +1 -1
- package/src/templates/version.ts.tmpl +0 -4
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
* Emulated bluetooth adapter state.
|
|
10
|
+
*/
|
|
11
|
+
export type AdapterState = 'absent' | 'powered-off' | 'powered-on';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @public
|
|
15
|
+
* Represents the simulated bluetooth peripheral's manufacturer data.
|
|
16
|
+
*/
|
|
17
|
+
export interface BluetoothManufacturerData {
|
|
18
|
+
/**
|
|
19
|
+
* The company identifier, as defined by the {@link https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/|Bluetooth SIG}.
|
|
20
|
+
*/
|
|
21
|
+
key: number;
|
|
22
|
+
/**
|
|
23
|
+
* The manufacturer-specific data as a base64-encoded string.
|
|
24
|
+
*/
|
|
25
|
+
data: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
* A bluetooth peripheral to be simulated.
|
|
31
|
+
*/
|
|
32
|
+
export interface PreconnectedPeripheral {
|
|
33
|
+
address: string;
|
|
34
|
+
name: string;
|
|
35
|
+
manufacturerData: BluetoothManufacturerData[];
|
|
36
|
+
knownServiceUuids: string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Exposes the bluetooth emulation abilities.
|
|
41
|
+
*
|
|
42
|
+
* @remarks {@link https://webbluetoothcg.github.io/web-bluetooth/#simulated-bluetooth-adapter|Web Bluetooth specification}
|
|
43
|
+
* requires the emulated adapters should be isolated per top-level navigable. However,
|
|
44
|
+
* at the moment Chromium's bluetooth emulation implementation is tight to the browser
|
|
45
|
+
* context, not the page. This means the bluetooth emulation exposed from different pages
|
|
46
|
+
* of the same browser context would interfere their states.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* await page.bluetooth.emulateAdapter('powered-on');
|
|
52
|
+
* await page.bluetooth.simulatePreconnectedPeripheral({
|
|
53
|
+
* address: '09:09:09:09:09:09',
|
|
54
|
+
* name: 'SOME_NAME',
|
|
55
|
+
* manufacturerData: [
|
|
56
|
+
* {
|
|
57
|
+
* key: 17,
|
|
58
|
+
* data: 'AP8BAX8=',
|
|
59
|
+
* },
|
|
60
|
+
* ],
|
|
61
|
+
* knownServiceUuids: ['12345678-1234-5678-9abc-def123456789'],
|
|
62
|
+
* });
|
|
63
|
+
* await page.bluetooth.disableEmulation();
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @experimental
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export interface BluetoothEmulation {
|
|
70
|
+
/**
|
|
71
|
+
* Emulate Bluetooth adapter. Required for bluetooth simulations
|
|
72
|
+
* See {@link https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-simulateAdapter-command|bluetooth.simulateAdapter}.
|
|
73
|
+
*
|
|
74
|
+
* @param state - The desired bluetooth adapter state.
|
|
75
|
+
* @param leSupported - Mark if the adapter supports low-energy bluetooth.
|
|
76
|
+
*
|
|
77
|
+
* @experimental
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
emulateAdapter(state: AdapterState, leSupported?: boolean): Promise<void>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Disable emulated bluetooth adapter.
|
|
84
|
+
* See {@link https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-disableSimulation-command|bluetooth.disableSimulation}.
|
|
85
|
+
*
|
|
86
|
+
* @experimental
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
disableEmulation(): Promise<void>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Simulated preconnected Bluetooth Peripheral.
|
|
93
|
+
* See {@link https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-simulateconnectedperipheral-command|bluetooth.simulatePreconnectedPeripheral}.
|
|
94
|
+
*
|
|
95
|
+
* @param preconnectedPeripheral - The peripheral to simulate.
|
|
96
|
+
*
|
|
97
|
+
* @experimental
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
simulatePreconnectedPeripheral(
|
|
101
|
+
preconnectedPeripheral: PreconnectedPeripheral,
|
|
102
|
+
): Promise<void>;
|
|
103
|
+
}
|
package/src/api/Browser.ts
CHANGED
|
@@ -210,6 +210,95 @@ export interface DebugInfo {
|
|
|
210
210
|
pendingProtocolErrors: Error[];
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
/**
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
export type WindowState = 'normal' | 'minimized' | 'maximized' | 'fullscreen';
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
221
|
+
export interface WindowBounds {
|
|
222
|
+
left?: number;
|
|
223
|
+
top?: number;
|
|
224
|
+
width?: number;
|
|
225
|
+
height?: number;
|
|
226
|
+
windowState?: WindowState;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
export type WindowId = string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
237
|
+
export type CreatePageOptions =
|
|
238
|
+
| {
|
|
239
|
+
type: 'tab';
|
|
240
|
+
}
|
|
241
|
+
| {
|
|
242
|
+
type: 'window';
|
|
243
|
+
windowBounds?: WindowBounds;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @public
|
|
248
|
+
*/
|
|
249
|
+
export interface ScreenOrientation {
|
|
250
|
+
angle: number;
|
|
251
|
+
type: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @public
|
|
256
|
+
*/
|
|
257
|
+
export interface ScreenInfo {
|
|
258
|
+
left: number;
|
|
259
|
+
top: number;
|
|
260
|
+
width: number;
|
|
261
|
+
height: number;
|
|
262
|
+
availLeft: number;
|
|
263
|
+
availTop: number;
|
|
264
|
+
availWidth: number;
|
|
265
|
+
availHeight: number;
|
|
266
|
+
devicePixelRatio: number;
|
|
267
|
+
colorDepth: number;
|
|
268
|
+
orientation: ScreenOrientation;
|
|
269
|
+
isExtended: boolean;
|
|
270
|
+
isInternal: boolean;
|
|
271
|
+
isPrimary: boolean;
|
|
272
|
+
label: string;
|
|
273
|
+
id: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @public
|
|
278
|
+
*/
|
|
279
|
+
export interface WorkAreaInsets {
|
|
280
|
+
top?: number;
|
|
281
|
+
left?: number;
|
|
282
|
+
bottom?: number;
|
|
283
|
+
right?: number;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @public
|
|
288
|
+
*/
|
|
289
|
+
export interface AddScreenParams {
|
|
290
|
+
left: number;
|
|
291
|
+
top: number;
|
|
292
|
+
width: number;
|
|
293
|
+
height: number;
|
|
294
|
+
workAreaInsets?: WorkAreaInsets;
|
|
295
|
+
devicePixelRatio?: number;
|
|
296
|
+
rotation?: number;
|
|
297
|
+
colorDepth?: number;
|
|
298
|
+
label?: string;
|
|
299
|
+
isInternal?: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
213
302
|
/**
|
|
214
303
|
* {@link Browser} represents a browser instance that is either:
|
|
215
304
|
*
|
|
@@ -324,7 +413,20 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
|
|
324
413
|
* Creates a new {@link Page | page} in the
|
|
325
414
|
* {@link Browser.defaultBrowserContext | default browser context}.
|
|
326
415
|
*/
|
|
327
|
-
abstract newPage(): Promise<Page>;
|
|
416
|
+
abstract newPage(options?: CreatePageOptions): Promise<Page>;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Gets the specified window {@link WindowBounds | bounds}.
|
|
420
|
+
*/
|
|
421
|
+
abstract getWindowBounds(windowId: WindowId): Promise<WindowBounds>;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Sets the specified window {@link WindowBounds | bounds}.
|
|
425
|
+
*/
|
|
426
|
+
abstract setWindowBounds(
|
|
427
|
+
windowId: WindowId,
|
|
428
|
+
windowBounds: WindowBounds,
|
|
429
|
+
): Promise<void>;
|
|
328
430
|
|
|
329
431
|
/**
|
|
330
432
|
* Gets all active {@link Target | targets}.
|
|
@@ -380,13 +482,15 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
|
|
380
482
|
* returns all {@link Page | pages} in all
|
|
381
483
|
* {@link BrowserContext | browser contexts}.
|
|
382
484
|
*
|
|
485
|
+
* @param includeAll - experimental, setting to true includes all kinds of pages.
|
|
486
|
+
*
|
|
383
487
|
* @remarks Non-visible {@link Page | pages}, such as `"background_page"`,
|
|
384
488
|
* will not be listed here. You can find them using {@link Target.page}.
|
|
385
489
|
*/
|
|
386
|
-
async pages(): Promise<Page[]> {
|
|
490
|
+
async pages(includeAll = false): Promise<Page[]> {
|
|
387
491
|
const contextPages = await Promise.all(
|
|
388
492
|
this.browserContexts().map(context => {
|
|
389
|
-
return context.pages();
|
|
493
|
+
return context.pages(includeAll);
|
|
390
494
|
}),
|
|
391
495
|
);
|
|
392
496
|
// Flatten array.
|
|
@@ -495,6 +599,29 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
|
|
495
599
|
*/
|
|
496
600
|
abstract uninstallExtension(id: string): Promise<void>;
|
|
497
601
|
|
|
602
|
+
/**
|
|
603
|
+
* Gets a list of {@link ScreenInfo | screen information objects}.
|
|
604
|
+
*/
|
|
605
|
+
abstract screens(): Promise<ScreenInfo[]>;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Adds a new screen, returns the added {@link ScreenInfo | screen information object}.
|
|
609
|
+
*
|
|
610
|
+
* @remarks
|
|
611
|
+
*
|
|
612
|
+
* Only supported in headless mode.
|
|
613
|
+
*/
|
|
614
|
+
abstract addScreen(params: AddScreenParams): Promise<ScreenInfo>;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Removes a screen.
|
|
618
|
+
*
|
|
619
|
+
* @remarks
|
|
620
|
+
*
|
|
621
|
+
* Only supported in headless mode. Fails if the primary screen id is specified.
|
|
622
|
+
*/
|
|
623
|
+
abstract removeScreen(screenId: string): Promise<void>;
|
|
624
|
+
|
|
498
625
|
/**
|
|
499
626
|
* Whether Puppeteer is connected to this {@link Browser | browser}.
|
|
500
627
|
*
|
|
@@ -25,7 +25,12 @@ import {
|
|
|
25
25
|
import {asyncDisposeSymbol, disposeSymbol} from '../util/disposable.js';
|
|
26
26
|
import {Mutex} from '../util/Mutex.js';
|
|
27
27
|
|
|
28
|
-
import type {
|
|
28
|
+
import type {
|
|
29
|
+
Browser,
|
|
30
|
+
CreatePageOptions,
|
|
31
|
+
Permission,
|
|
32
|
+
WaitForTargetOptions,
|
|
33
|
+
} from './Browser.js';
|
|
29
34
|
import type {Page} from './Page.js';
|
|
30
35
|
import type {Target} from './Target.js';
|
|
31
36
|
|
|
@@ -181,10 +186,12 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
|
|
|
181
186
|
* Gets a list of all open {@link Page | pages} inside this
|
|
182
187
|
* {@link BrowserContext | browser context}.
|
|
183
188
|
*
|
|
189
|
+
* @param includeAll - experimental, setting to true includes all kinds of pages.
|
|
190
|
+
*
|
|
184
191
|
* @remarks Non-visible {@link Page | pages}, such as `"background_page"`,
|
|
185
192
|
* will not be listed here. You can find them using {@link Target.page}.
|
|
186
193
|
*/
|
|
187
|
-
abstract pages(): Promise<Page[]>;
|
|
194
|
+
abstract pages(includeAll?: boolean): Promise<Page[]>;
|
|
188
195
|
|
|
189
196
|
/**
|
|
190
197
|
* Grants this {@link BrowserContext | browser context} the given
|
|
@@ -230,7 +237,7 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
|
|
|
230
237
|
* Creates a new {@link Page | page} in this
|
|
231
238
|
* {@link BrowserContext | browser context}.
|
|
232
239
|
*/
|
|
233
|
-
abstract newPage(): Promise<Page>;
|
|
240
|
+
abstract newPage(options?: CreatePageOptions): Promise<Page>;
|
|
234
241
|
|
|
235
242
|
/**
|
|
236
243
|
* Gets the {@link Browser | browser} associated with this
|
package/src/api/CDPSession.ts
CHANGED
|
@@ -41,8 +41,7 @@ export namespace CDPSessionEvent {
|
|
|
41
41
|
* @public
|
|
42
42
|
*/
|
|
43
43
|
export interface CDPSessionEvents
|
|
44
|
-
extends CDPEvents,
|
|
45
|
-
Record<EventType, unknown> {
|
|
44
|
+
extends CDPEvents, Record<EventType, unknown> {
|
|
46
45
|
/** @internal */
|
|
47
46
|
[CDPSessionEvent.Disconnected]: undefined;
|
|
48
47
|
/** @internal */
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type {WaitTimeoutOptions} from './Page.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Device in a request prompt.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export interface DeviceRequestPromptDevice {
|
|
15
|
+
/**
|
|
16
|
+
* Device id during a prompt.
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Device name as it appears in a prompt.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Device request prompts let you respond to the page requesting for a device
|
|
28
|
+
* through an API like WebBluetooth.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* `DeviceRequestPrompt` instances are returned via the
|
|
32
|
+
* {@link Page.waitForDevicePrompt} method.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* const [devicePrompt] = Promise.all([
|
|
38
|
+
* page.waitForDevicePrompt(),
|
|
39
|
+
* page.click('#connect-bluetooth'),
|
|
40
|
+
* ]);
|
|
41
|
+
* await devicePrompt.select(
|
|
42
|
+
* await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export abstract class DeviceRequestPrompt {
|
|
49
|
+
/**
|
|
50
|
+
* Current list of selectable devices.
|
|
51
|
+
*/
|
|
52
|
+
readonly devices: DeviceRequestPromptDevice[] = [];
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Resolve to the first device in the prompt matching a filter.
|
|
56
|
+
*/
|
|
57
|
+
abstract waitForDevice(
|
|
58
|
+
filter: (device: DeviceRequestPromptDevice) => boolean,
|
|
59
|
+
options?: WaitTimeoutOptions,
|
|
60
|
+
): Promise<DeviceRequestPromptDevice>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Select a device in the prompt's list.
|
|
64
|
+
*/
|
|
65
|
+
abstract select(device: DeviceRequestPromptDevice): Promise<void>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Cancel the prompt.
|
|
69
|
+
*/
|
|
70
|
+
abstract cancel(): Promise<void>;
|
|
71
|
+
}
|
package/src/api/ElementHandle.ts
CHANGED
|
@@ -562,10 +562,8 @@ export abstract class ElementHandle<
|
|
|
562
562
|
async $$eval<
|
|
563
563
|
Selector extends string,
|
|
564
564
|
Params extends unknown[],
|
|
565
|
-
Func extends EvaluateFuncWith<
|
|
566
|
-
Array<NodeFor<Selector>>,
|
|
567
|
-
Params
|
|
568
|
-
> = EvaluateFuncWith<Array<NodeFor<Selector>>, Params>,
|
|
565
|
+
Func extends EvaluateFuncWith<Array<NodeFor<Selector>>, Params> =
|
|
566
|
+
EvaluateFuncWith<Array<NodeFor<Selector>>, Params>,
|
|
569
567
|
>(
|
|
570
568
|
selector: Selector,
|
|
571
569
|
pageFunction: Func | string,
|
package/src/api/Frame.ts
CHANGED
|
@@ -15,7 +15,6 @@ import type {
|
|
|
15
15
|
WaitTimeoutOptions,
|
|
16
16
|
} from '../api/Page.js';
|
|
17
17
|
import type {Accessibility} from '../cdp/Accessibility.js';
|
|
18
|
-
import type {DeviceRequestPrompt} from '../cdp/DeviceRequestPrompt.js';
|
|
19
18
|
import type {PuppeteerLifeCycleEvent} from '../cdp/LifecycleWatcher.js';
|
|
20
19
|
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
|
21
20
|
import {getQueryHandlerAndSelector} from '../common/GetQueryHandler.js';
|
|
@@ -33,6 +32,7 @@ import {assert} from '../util/assert.js';
|
|
|
33
32
|
import {throwIfDisposed} from '../util/decorators.js';
|
|
34
33
|
|
|
35
34
|
import type {CDPSession} from './CDPSession.js';
|
|
35
|
+
import type {DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
|
36
36
|
import type {KeyboardTypeOptions} from './Input.js';
|
|
37
37
|
import {
|
|
38
38
|
FunctionLocator,
|
|
@@ -685,10 +685,8 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
|
|
|
685
685
|
async $$eval<
|
|
686
686
|
Selector extends string,
|
|
687
687
|
Params extends unknown[],
|
|
688
|
-
Func extends EvaluateFuncWith<
|
|
689
|
-
Array<NodeFor<Selector>>,
|
|
690
|
-
Params
|
|
691
|
-
> = EvaluateFuncWith<Array<NodeFor<Selector>>, Params>,
|
|
688
|
+
Func extends EvaluateFuncWith<Array<NodeFor<Selector>>, Params> =
|
|
689
|
+
EvaluateFuncWith<Array<NodeFor<Selector>>, Params>,
|
|
692
690
|
>(
|
|
693
691
|
selector: Selector,
|
|
694
692
|
pageFunction: string | Func,
|
package/src/api/Page.ts
CHANGED
|
@@ -32,7 +32,6 @@ import type {HTTPRequest} from '../api/HTTPRequest.js';
|
|
|
32
32
|
import type {HTTPResponse} from '../api/HTTPResponse.js';
|
|
33
33
|
import type {Accessibility} from '../cdp/Accessibility.js';
|
|
34
34
|
import type {Coverage} from '../cdp/Coverage.js';
|
|
35
|
-
import type {DeviceRequestPrompt} from '../cdp/DeviceRequestPrompt.js';
|
|
36
35
|
import type {NetworkConditions} from '../cdp/NetworkManager.js';
|
|
37
36
|
import type {Tracing} from '../cdp/Tracing.js';
|
|
38
37
|
import type {ConsoleMessage} from '../common/ConsoleMessage.js';
|
|
@@ -82,9 +81,11 @@ import {
|
|
|
82
81
|
} from '../util/disposable.js';
|
|
83
82
|
import {stringToTypedArray} from '../util/encoding.js';
|
|
84
83
|
|
|
85
|
-
import type {
|
|
84
|
+
import type {BluetoothEmulation} from './BluetoothEmulation.js';
|
|
85
|
+
import type {Browser, WindowId} from './Browser.js';
|
|
86
86
|
import type {BrowserContext} from './BrowserContext.js';
|
|
87
87
|
import type {CDPSession} from './CDPSession.js';
|
|
88
|
+
import type {DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
|
88
89
|
import type {Dialog} from './Dialog.js';
|
|
89
90
|
import type {
|
|
90
91
|
BoundingBox,
|
|
@@ -306,7 +307,7 @@ export interface ScreenshotOptions {
|
|
|
306
307
|
* relative to current working directory. If no path is provided, the image
|
|
307
308
|
* won't be saved to the disk.
|
|
308
309
|
*/
|
|
309
|
-
path?:
|
|
310
|
+
path?: string;
|
|
310
311
|
/**
|
|
311
312
|
* Specifies the region of the page/element to clip.
|
|
312
313
|
*/
|
|
@@ -633,6 +634,19 @@ export function setDefaultScreenshotOptions(options: ScreenshotOptions): void {
|
|
|
633
634
|
options.captureBeyondViewport ??= true;
|
|
634
635
|
}
|
|
635
636
|
|
|
637
|
+
/**
|
|
638
|
+
* @public
|
|
639
|
+
*/
|
|
640
|
+
export interface ReloadOptions extends WaitForOptions {
|
|
641
|
+
/**
|
|
642
|
+
* If set to true, the browser caches are ignored for the page reload.
|
|
643
|
+
*
|
|
644
|
+
* @defaultValue true
|
|
645
|
+
* @public
|
|
646
|
+
*/
|
|
647
|
+
ignoreCache?: boolean;
|
|
648
|
+
}
|
|
649
|
+
|
|
636
650
|
/**
|
|
637
651
|
* Page provides methods to interact with a single tab or
|
|
638
652
|
* {@link https://developer.chrome.com/extensions/background_pages | extension background page}
|
|
@@ -1442,10 +1456,8 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
1442
1456
|
async $$eval<
|
|
1443
1457
|
Selector extends string,
|
|
1444
1458
|
Params extends unknown[],
|
|
1445
|
-
Func extends EvaluateFuncWith<
|
|
1446
|
-
Array<NodeFor<Selector>>,
|
|
1447
|
-
Params
|
|
1448
|
-
> = EvaluateFuncWith<Array<NodeFor<Selector>>, Params>,
|
|
1459
|
+
Func extends EvaluateFuncWith<Array<NodeFor<Selector>>, Params> =
|
|
1460
|
+
EvaluateFuncWith<Array<NodeFor<Selector>>, Params>,
|
|
1449
1461
|
>(
|
|
1450
1462
|
selector: Selector,
|
|
1451
1463
|
pageFunction: Func | string,
|
|
@@ -1743,7 +1755,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
1743
1755
|
* multiple redirects, the navigation will resolve with the response of the
|
|
1744
1756
|
* last redirect.
|
|
1745
1757
|
*/
|
|
1746
|
-
abstract reload(options?:
|
|
1758
|
+
abstract reload(options?: ReloadOptions): Promise<HTTPResponse | null>;
|
|
1747
1759
|
|
|
1748
1760
|
/**
|
|
1749
1761
|
* Waits for the page to navigate to a new URL or to reload. It is useful when
|
|
@@ -2691,6 +2703,13 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
2691
2703
|
return typedArray;
|
|
2692
2704
|
}
|
|
2693
2705
|
|
|
2706
|
+
/**
|
|
2707
|
+
* Emulates focus state of the page.
|
|
2708
|
+
*
|
|
2709
|
+
* @param enabled - Whether to emulate focus.
|
|
2710
|
+
*/
|
|
2711
|
+
abstract emulateFocusedPage(enabled: boolean): Promise<void>;
|
|
2712
|
+
|
|
2694
2713
|
/**
|
|
2695
2714
|
* @internal
|
|
2696
2715
|
*/
|
|
@@ -3136,7 +3155,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
3136
3155
|
|
|
3137
3156
|
/**
|
|
3138
3157
|
* Resizes the browser window the page is in so that the content area
|
|
3139
|
-
* (excluding browser UI) is according to the specified
|
|
3158
|
+
* (excluding browser UI) is according to the specified width and height.
|
|
3140
3159
|
*
|
|
3141
3160
|
* @experimental
|
|
3142
3161
|
* @internal
|
|
@@ -3146,6 +3165,13 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
3146
3165
|
contentHeight: number;
|
|
3147
3166
|
}): Promise<void>;
|
|
3148
3167
|
|
|
3168
|
+
/**
|
|
3169
|
+
* Returns the page's window id.
|
|
3170
|
+
*
|
|
3171
|
+
* @experimental
|
|
3172
|
+
*/
|
|
3173
|
+
abstract windowId(): Promise<WindowId>;
|
|
3174
|
+
|
|
3149
3175
|
/** @internal */
|
|
3150
3176
|
override [disposeSymbol](): void {
|
|
3151
3177
|
return void this.close().catch(debugError);
|
|
@@ -3155,6 +3181,17 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
3155
3181
|
[asyncDisposeSymbol](): Promise<void> {
|
|
3156
3182
|
return this.close();
|
|
3157
3183
|
}
|
|
3184
|
+
|
|
3185
|
+
/**
|
|
3186
|
+
* Opens DevTools for the current Page and returns the DevTools Page. This
|
|
3187
|
+
* method is only available in Chrome.
|
|
3188
|
+
*/
|
|
3189
|
+
abstract openDevTools(): Promise<Page>;
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* {@inheritDoc BluetoothEmulation}
|
|
3193
|
+
*/
|
|
3194
|
+
abstract get bluetooth(): BluetoothEmulation;
|
|
3158
3195
|
}
|
|
3159
3196
|
|
|
3160
3197
|
/**
|
package/src/api/api.ts
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
export type * from './BluetoothEmulation.js';
|
|
7
8
|
export * from './Browser.js';
|
|
8
9
|
export * from './BrowserContext.js';
|
|
9
10
|
export * from './CDPSession.js';
|
|
11
|
+
export * from './DeviceRequestPrompt.js';
|
|
10
12
|
export * from './Dialog.js';
|
|
11
13
|
export * from './ElementHandle.js';
|
|
12
14
|
export type * from './Environment.js';
|
package/src/bidi/BidiOverCdp.ts
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
AdapterState,
|
|
9
|
+
BluetoothEmulation,
|
|
10
|
+
PreconnectedPeripheral,
|
|
11
|
+
} from '../api/BluetoothEmulation.js';
|
|
12
|
+
|
|
13
|
+
import type {Session} from './core/Session.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export class BidiBluetoothEmulation implements BluetoothEmulation {
|
|
19
|
+
readonly #session: Session;
|
|
20
|
+
readonly #contextId: string;
|
|
21
|
+
|
|
22
|
+
constructor(contextId: string, session: Session) {
|
|
23
|
+
this.#contextId = contextId;
|
|
24
|
+
this.#session = session;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async emulateAdapter(state: AdapterState, leSupported = true): Promise<void> {
|
|
28
|
+
await this.#session.send('bluetooth.simulateAdapter', {
|
|
29
|
+
context: this.#contextId,
|
|
30
|
+
state,
|
|
31
|
+
leSupported,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async disableEmulation(): Promise<void> {
|
|
36
|
+
await this.#session.send('bluetooth.disableSimulation', {
|
|
37
|
+
context: this.#contextId,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async simulatePreconnectedPeripheral(
|
|
42
|
+
preconnectedPeripheral: PreconnectedPeripheral,
|
|
43
|
+
): Promise<void> {
|
|
44
|
+
await this.#session.send('bluetooth.simulatePreconnectedPeripheral', {
|
|
45
|
+
context: this.#contextId,
|
|
46
|
+
address: preconnectedPeripheral.address,
|
|
47
|
+
name: preconnectedPeripheral.name,
|
|
48
|
+
manufacturerData: preconnectedPeripheral.manufacturerData,
|
|
49
|
+
knownServiceUuids: preconnectedPeripheral.knownServiceUuids,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
package/src/bidi/Browser.ts
CHANGED
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
BrowserEvent,
|
|
15
15
|
type BrowserCloseCallback,
|
|
16
16
|
type BrowserContextOptions,
|
|
17
|
+
type ScreenInfo,
|
|
18
|
+
type AddScreenParams,
|
|
19
|
+
type WindowBounds,
|
|
20
|
+
type WindowId,
|
|
17
21
|
type DebugInfo,
|
|
18
22
|
} from '../api/Browser.js';
|
|
19
23
|
import {BrowserContextEvent} from '../api/BrowserContext.js';
|
|
@@ -22,6 +26,7 @@ import type {Target} from '../api/Target.js';
|
|
|
22
26
|
import type {Connection as CdpConnection} from '../cdp/Connection.js';
|
|
23
27
|
import type {SupportedWebDriverCapabilities} from '../common/ConnectOptions.js';
|
|
24
28
|
import {ProtocolError} from '../common/Errors.js';
|
|
29
|
+
import {UnsupportedOperation} from '../common/Errors.js';
|
|
25
30
|
import {EventEmitter} from '../common/EventEmitter.js';
|
|
26
31
|
import {debugError} from '../common/util.js';
|
|
27
32
|
import type {Viewport} from '../common/Viewport.js';
|
|
@@ -289,6 +294,29 @@ export class BidiBrowser extends Browser {
|
|
|
289
294
|
await this.#browserCore.uninstallExtension(id);
|
|
290
295
|
}
|
|
291
296
|
|
|
297
|
+
override screens(): Promise<ScreenInfo[]> {
|
|
298
|
+
throw new UnsupportedOperation();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
override addScreen(_params: AddScreenParams): Promise<ScreenInfo> {
|
|
302
|
+
throw new UnsupportedOperation();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
override removeScreen(_screenId: string): Promise<void> {
|
|
306
|
+
throw new UnsupportedOperation();
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
override getWindowBounds(_windowId: WindowId): Promise<WindowBounds> {
|
|
310
|
+
throw new UnsupportedOperation();
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
override setWindowBounds(
|
|
314
|
+
_windowId: WindowId,
|
|
315
|
+
_windowBounds: WindowBounds,
|
|
316
|
+
): Promise<void> {
|
|
317
|
+
throw new UnsupportedOperation();
|
|
318
|
+
}
|
|
319
|
+
|
|
292
320
|
override targets(): Target[] {
|
|
293
321
|
return [
|
|
294
322
|
this.#target,
|