From f454a649376d50b99f79f704f998ce4f3a3cdf89 Mon Sep 17 00:00:00 2001 From: romainmenke Date: Sat, 2 Jul 2022 10:51:18 +0200 Subject: [PATCH] add SetW3CCompatibility toggle --- remote.go | 4 ++++ selenium.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/remote.go b/remote.go index 653b5f4..ed25303 100644 --- a/remote.go +++ b/remote.go @@ -537,6 +537,10 @@ func (wd *remoteWD) SwitchSession(sessionID string) error { return nil } +func (wd *remoteWD) SetW3CCompatibility(isCompatible bool) { + wd.w3cCompatible = isCompatible +} + func (wd *remoteWD) Capabilities() (Capabilities, error) { url := wd.requestURL("/session/%s", wd.id) response, err := wd.execute("GET", url, nil) diff --git a/selenium.go b/selenium.go index ecd8c91..301d823 100644 --- a/selenium.go +++ b/selenium.go @@ -275,6 +275,9 @@ type WebDriver interface { // SwitchSession switches to the given session ID. SwitchSession(sessionID string) error + // Toggle W3C compliance. + SetW3CCompatibility(bool) + // Capabilities returns the current session's capabilities. Capabilities() (Capabilities, error)