Back to Puppeteer

BluetoothEmulation.emulateAdapter() method

website/versioned_docs/version-24.40.0/api/puppeteer.bluetoothemulation.emulateadapter.md

19.2.2800 B
Original Source

BluetoothEmulation.emulateAdapter() method

Emulate Bluetooth adapter. Required for bluetooth simulations See bluetooth.simulateAdapter.

Signature

typescript
interface BluetoothEmulation {
  emulateAdapter(state: AdapterState, leSupported?: boolean): Promise<void>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

state

</td><td>

AdapterState

</td><td>

The desired bluetooth adapter state.

</td></tr> <tr><td>

leSupported

</td><td>

boolean

</td><td>

(Optional) Mark if the adapter supports low-energy bluetooth.

</td></tr> </tbody></table>

Returns:

Promise<void>