From 4aafc5b935b4dbcf7d0cbef6fee85595aa5a526c Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Sat, 15 Apr 2023 12:04:45 -0400 Subject: [PATCH] 1 --- remote.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/remote.go b/remote.go index cccbfcf..91483c8 100644 --- a/remote.go +++ b/remote.go @@ -291,7 +291,7 @@ func (wd *remoteWD) voidCommand(urlTemplate string, params interface{}) error { return voidCommand("POST", wd.requestURL(urlTemplate, wd.id), params) } -func (wd remoteWD) stringsCommand(urlTemplate string) ([]string, error) { +func (wd *remoteWD) stringsCommand(urlTemplate string) ([]string, error) { url := wd.requestURL(urlTemplate, wd.id) response, err := wd.execute("GET", url, nil) if err != nil { @@ -1278,6 +1278,15 @@ func (wd *remoteWD) SetAlertText(text string) error { return wd.voidCommand("/session/%s/alert/text", data) } +func (wd *remoteWD) AddVirtualAuthenticator(params map[string]interface{}) error { + return wd.voidCommand("/session/%s/webauthn/authenticator", params) +} + +func (wd *remoteWD) RemoveVirtualAuthenticator(id string) error { + _, err := wd.execute("DELETE", wd.requestURL("/session/%s/webauthn/authenticator/"+id, wd.id), nil) + return err +} + func (wd *remoteWD) execScriptRaw(script string, args []interface{}, suffix string) ([]byte, error) { if args == nil { args = make([]interface{}, 0)