Class BluetoothEmulation
java.lang.Object
org.openqa.selenium.devtools.v136.bluetoothemulation.BluetoothEmulation
This domain allows configuring virtual Bluetooth devices to test
the web-bluetooth API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.devtools.Command<String>
addCharacteristic
(String address, String serviceId, String characteristicUuid, CharacteristicProperties properties) Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId| in the peripheral with |address|.static org.openqa.selenium.devtools.Command<String>
addService
(String address, String serviceUuid) Adds a service with |serviceUuid| to the peripheral with |address|.static org.openqa.selenium.devtools.Command<Void>
disable()
Disable the BluetoothEmulation domain.static org.openqa.selenium.devtools.Command<Void>
enable
(CentralState state, Boolean leSupported) Enable the BluetoothEmulation domain.static org.openqa.selenium.devtools.Event<GattOperationReceived>
static org.openqa.selenium.devtools.Command<Void>
removeCharacteristic
(String address, String serviceId, String characteristicId) Removes the characteristic respresented by |characteristicId| from the service respresented by |serviceId| in the peripheral with |address|.static org.openqa.selenium.devtools.Command<Void>
removeService
(String address, String serviceId) Removes the service respresented by |serviceId| from the peripheral with |address|.static org.openqa.selenium.devtools.Command<Void>
Set the state of the simulated central.static org.openqa.selenium.devtools.Command<Void>
simulateAdvertisement
(ScanEntry entry) Simulates an advertisement packet described in |entry| being received by the central.static org.openqa.selenium.devtools.Command<Void>
simulateGATTOperationResponse
(String address, GATTOperationType type, Integer code) Simulates the response code from the peripheral with |address| for a GATT operation of |type|.static org.openqa.selenium.devtools.Command<Void>
simulatePreconnectedPeripheral
(String address, String name, List<ManufacturerData> manufacturerData, List<String> knownServiceUuids) Simulates a peripheral with |address|, |name| and |knownServiceUuids| that has already been connected to the system.
-
Constructor Details
-
BluetoothEmulation
public BluetoothEmulation()
-
-
Method Details
-
enable
public static org.openqa.selenium.devtools.Command<Void> enable(CentralState state, Boolean leSupported) Enable the BluetoothEmulation domain. -
setSimulatedCentralState
public static org.openqa.selenium.devtools.Command<Void> setSimulatedCentralState(CentralState state) Set the state of the simulated central. -
disable
Disable the BluetoothEmulation domain. -
simulatePreconnectedPeripheral
public static org.openqa.selenium.devtools.Command<Void> simulatePreconnectedPeripheral(String address, String name, List<ManufacturerData> manufacturerData, List<String> knownServiceUuids) Simulates a peripheral with |address|, |name| and |knownServiceUuids| that has already been connected to the system. -
simulateAdvertisement
Simulates an advertisement packet described in |entry| being received by the central. -
simulateGATTOperationResponse
public static org.openqa.selenium.devtools.Command<Void> simulateGATTOperationResponse(String address, GATTOperationType type, Integer code) Simulates the response code from the peripheral with |address| for a GATT operation of |type|. The |code| value follows the HCI Error Codes from Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes. -
addService
public static org.openqa.selenium.devtools.Command<String> addService(String address, String serviceUuid) Adds a service with |serviceUuid| to the peripheral with |address|. -
removeService
public static org.openqa.selenium.devtools.Command<Void> removeService(String address, String serviceId) Removes the service respresented by |serviceId| from the peripheral with |address|. -
addCharacteristic
public static org.openqa.selenium.devtools.Command<String> addCharacteristic(String address, String serviceId, String characteristicUuid, CharacteristicProperties properties) Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId| in the peripheral with |address|. -
removeCharacteristic
public static org.openqa.selenium.devtools.Command<Void> removeCharacteristic(String address, String serviceId, String characteristicId) Removes the characteristic respresented by |characteristicId| from the service respresented by |serviceId| in the peripheral with |address|. -
gattOperationReceived
-