Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionUse constructor with timeout parameter:
BiDi(Connection, Duration)BiDi is an internal implementation detail. Direct access to the BiDi object from drivers will be removed in a future release.BiDi is an internal implementation detail. Direct access to the BiDi object from drivers will be removed in a future release.useNoOpCdpInfo(String, Collection)insteadUseNoOpDomains(String, Collection)instead.Log diagnostics at a fixed level such asLevel.FINE.Debug.configureLogger()makes those records visible when debugging is enabled.Instant is not a basic JSON type, use theInstantCoercerinstead.the client knows the Factory and could call a cleanup method after closethis field will becomeprotectedin 4.53; read it from a subclass instead.this field will be removed in 4.53; keep a reference to the factory in the subclass instead.
-
Deprecated ClassesClassDescriptionNot used. In BiDi spec, type `browser.ClientWindow` is just text (String).The JSON Wire Protocol is no longer used; use
ErrorCodecfor mapping between W3C states and exceptions. Removal is tracked by #17638 and is gated on providing a replacement extensibility seam for downstream consumers.
-
Deprecated FieldsFieldDescriptionlocalStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("window.localStorage.clear()") instead.sessionStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("window.sessionStorage.clear()") instead.localStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("return window.localStorage.getItem('key')") instead.localStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("return Object.keys(window.localStorage)") instead.localStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("return window.localStorage.length") instead.sessionStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("return window.sessionStorage.getItem('key')") instead.sessionStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("return Object.keys(window.sessionStorage)") instead.sessionStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("return window.sessionStorage.length") instead.localStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("window.localStorage.removeItem('key')") instead.sessionStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("window.sessionStorage.removeItem('key')") instead.localStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("window.localStorage.setItem('key', 'value')") instead.sessionStorage is not part of W3C WebDriver spec. Use ((JavascriptExecutor) driver).executeScript("window.sessionStorage.setItem('key', 'value')") instead.this field will become
protectedin 4.53; read it from a subclass instead.this field will be removed in 4.53; keep a reference to the factory in the subclass instead.
-
Deprecated MethodsMethodDescriptionBiDi is an internal implementation detail. Direct access to the BiDi object from drivers will be removed in a future release.BiDi is an internal implementation detail. Direct access to the BiDi object from drivers will be removed in a future release.Not needed. All CDP commands return something, at least empty map.List of container logs might be very long. If you need to write down the logs, use
ContainerLogs.getLogs()to avoid reading the whole content to memory.Use methodHasDownloads.getDownloadedFiles()insteadLog diagnostics at a fixed level such asLevel.FINE.Debug.configureLogger()makes those records visible when debugging is enabled.UseRead.resourceAsString(Class, String)insteadInstant is not a basic JSON type, use theInstantCoercerinstead.Not needed anymore. It's a bad idea to read the entire file to memory. It may cause OutOfMemory errors in case of large files.Use methodContents.Supplier.contentAsString(Charset)instead.Use methodHttpMessage.contentAsString()insteadthe client knows the Factory and could call a cleanup method after closeUse methodRemoteWebDriver.getDownloadedFiles()insteadThe integer status is a JSON Wire Protocol artifact; useResponse.getState()(the W3C state) instead. Removal is tracked by #17638.The integer status is a JSON Wire Protocol artifact; useResponse.setState(String)(the W3C state) instead. Removal is tracked by #17638.
-
Deprecated ConstructorsConstructorDescriptionUse constructor with timeout parameter:
BiDi(Connection, Duration)Use constructor withClientConfigparameteruseNoOpCdpInfo(String, Collection)insteadUseNoOpDomains(String, Collection)instead.
-
Deprecated Enum ConstantsEnum ConstantDescriptionThe FN key is not part of the W3C WebDriver specification and does not have a standardized Unicode mapping. Its behavior is not guaranteed across drivers/platforms.