Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionUse constructor with timeout parameter:
BiDi(Connection, Duration)Instant is not a basic JSON type, use theInstantCoercerinstead.org.openqa.selenium.remote.http.HttpClient.sendAsyncNative(HttpRequest, HttpResponse.BodyHandler<T>) use JdkHttpClient#httpClient() instead.use JdkHttpClient#httpClient() 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.use
DriverCommand.DOWNLOAD_FILEinsteadlocalStorage 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.
-
Deprecated MethodsMethodDescriptionNot 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()insteadUseRead.resourceAsString(Class, String)insteadInstant is not a basic JSON type, use theInstantCoercerinstead.getFtpProxy is deprecated and will be removed in a future release.setFtpProxy is deprecated and will be removed in a future release.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()insteadorg.openqa.selenium.remote.http.HttpClient.sendAsyncNative(HttpRequest, HttpResponse.BodyHandler<T>) use JdkHttpClient#httpClient() instead.use JdkHttpClient#httpClient() instead.Use 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 withClientConfigparameter
-
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.