org.openqa.selenium.devtools.v130.bluetoothemulation.BluetoothEmulation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools-v130 Show documentation
Show all versions of selenium-devtools-v130 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
The newest version!
package org.openqa.selenium.devtools.v130.bluetoothemulation;
import org.openqa.selenium.Beta;
import org.openqa.selenium.devtools.Command;
import org.openqa.selenium.devtools.Event;
import org.openqa.selenium.devtools.ConverterFunctions;
import java.util.Map;
import java.util.LinkedHashMap;
import org.openqa.selenium.json.JsonInput;
/**
* This domain allows configuring virtual Bluetooth devices to test
* the web-bluetooth API.
*/
@Beta()
public class BluetoothEmulation {
/**
* Enable the BluetoothEmulation domain.
*/
public static Command enable(org.openqa.selenium.devtools.v130.bluetoothemulation.model.CentralState state) {
java.util.Objects.requireNonNull(state, "state is required");
LinkedHashMap params = new LinkedHashMap<>();
params.put("state", state);
return new Command<>("BluetoothEmulation.enable", Map.copyOf(params));
}
/**
* Disable the BluetoothEmulation domain.
*/
public static Command disable() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("BluetoothEmulation.disable", Map.copyOf(params));
}
/**
* Simulates a peripheral with |address|, |name| and |knownServiceUuids|
* that has already been connected to the system.
*/
public static Command simulatePreconnectedPeripheral(java.lang.String address, java.lang.String name, java.util.List manufacturerData, java.util.List knownServiceUuids) {
java.util.Objects.requireNonNull(address, "address is required");
java.util.Objects.requireNonNull(name, "name is required");
java.util.Objects.requireNonNull(manufacturerData, "manufacturerData is required");
java.util.Objects.requireNonNull(knownServiceUuids, "knownServiceUuids is required");
LinkedHashMap params = new LinkedHashMap<>();
params.put("address", address);
params.put("name", name);
params.put("manufacturerData", manufacturerData);
params.put("knownServiceUuids", knownServiceUuids);
return new Command<>("BluetoothEmulation.simulatePreconnectedPeripheral", Map.copyOf(params));
}
/**
* Simulates an advertisement packet described in |entry| being received by
* the central.
*/
public static Command simulateAdvertisement(org.openqa.selenium.devtools.v130.bluetoothemulation.model.ScanEntry entry) {
java.util.Objects.requireNonNull(entry, "entry is required");
LinkedHashMap params = new LinkedHashMap<>();
params.put("entry", entry);
return new Command<>("BluetoothEmulation.simulateAdvertisement", Map.copyOf(params));
}
}