## 🚀 Feature Proposal

#7753 added basic support for WebAuthn automation in the form of the `addVirtualAuthenticator` and `removeVirtualAuthenticator` methods. Implement the rest of the methods: `addCredential`, `getCredential`, `removeCredential`, `removeAllCredentials`, `setUserVerified`.

## Motivation

Support more WebAuthn use-cases, like logging in with a specific credential, handling user verification failures, and inspecting generated credentials.

## Example

For a page like this

```html
<button id="login">Log in with WebAuthn</button>
<span id="result"></span>
```

```javascript
document.getElmentById("login").addEventListener("click", () => {
  navigator.credentials.get({...}).then(assertion => {
    document.getElementById("result").innerText = "Success!";
  })
});
```

A test could be written like so:

```java
// Set up the virtual authenticator.
HasVirtualAuthenticator virtualAuthenticatorManager = ((HasVirtualAuthenticator) driver);
VirtualAuthenticatorOptions options = new VirtualAuthenticatorOptions();
VirtualAuthenticator authenticator =
    virtualAuthenticatorManager.addVirtualAuthenticator(options);

// New code: inject a credential into the authenticator.
// Without this API the developer would have to generate a credential through
// navigator.credentials.create({...}) on the javascript side and would have less
// control over the resulting PK.
Credential credential = Credential.createNonResidentCredential(...params);
virtualAuthenticatorManager.addCredential(authenticator, credential);

// Assert login successful:
driver.findElement(By.id("login")).click();
WebElement result = driver.findElement(By.id("result"));
new WebDriverWait(driver, 60, 1000).until(
    driver -> !result.getText().equals(""));
assertThat(result.getText()).isEqualTo("Success!");
```
}
  String CLICK_ELEMENT = "clickElement";
  static CommandPayload CLICK_ELEMENT(String id) {
    return new CommandPayload(CLICK_ELEMENT, ImmutableMap.of("id", id));
  }
  String SEND_KEYS_TO_ELEMENT = "sendKeysToElement";
  static CommandPayload SEND_KEYS_TO_ELEMENT(String id, CharSequence[] keysToSend) {
    return new CommandPayload(SEND_KEYS_TO_ELEMENT, ImmutableMap.of("id", id, "value", keysToSend));
  }
  String SEND_KEYS_TO_ACTIVE_ELEMENT = "sendKeysToActiveElement";
  String SUBMIT_ELEMENT = "submitElement";
  static CommandPayload SUBMIT_ELEMENT(String id) {
    return new CommandPayload(SUBMIT_ELEMENT, ImmutableMap.of("id", id));
  }
  String UPLOAD_FILE = "uploadFile";
  static CommandPayload UPLOAD_FILE(String file) {
    return new CommandPayload(UPLOAD_FILE, ImmutableMap.of("file", file));
  }
  String GET_CURRENT_WINDOW_HANDLE = "getCurrentWindowHandle";
  String GET_WINDOW_HANDLES = "getWindowHandles";
  String GET_CURRENT_CONTEXT_HANDLE = "getCurrentContextHandle";
  String GET_CONTEXT_HANDLES = "getContextHandles";
  String SWITCH_TO_WINDOW = "switchToWindow";
  static CommandPayload SWITCH_TO_WINDOW(String windowHandleOrName) {
    return new CommandPayload(SWITCH_TO_WINDOW, ImmutableMap.of("handle", windowHandleOrName));
  }
  String SWITCH_TO_NEW_WINDOW = "newWindow";
  static CommandPayload SWITCH_TO_NEW_WINDOW(WindowType typeHint) {
    return new CommandPayload(SWITCH_TO_NEW_WINDOW, ImmutableMap.of("type", typeHint.toString()));
  }