org.openqa.selenium.remote.internal.ApacheHttpClient is deprecated in Selenium 3.14.0 - What should be used instead?

匆匆过客 提交于 2019-12-05 03:38:16
Corey Goldberg

The HTTP client was switched to okhttp: http://square.github.io/okhttp/

This is mentioned in the Selenium Java CHANGELOG of version 3.11.0 and also you can see it in the source code.

A couple of facts:

  • The Java RemoteWebDriver client uses a CommandExecutor to send commands to a RemoteWebDriver. By default, RemoteWebDriver uses an HttpCommandExecutor which uses the Apache HttpClient library to send the commands.
  • As per the CHANGELOG
    • The HttpClient implementation details were out of HttpCommandExecutor right from Selenium v2.45.0.
    • With the availability of Selenium v3.11, Selenium Grid was switched to use OkHttp rather than the Apache HttpClient.
    • Further with the release of Selenium v3.141.0, Apache HttpClient was removed from selenium-server-standalone which drastically reduced the size of selenium server distribution package.
    • Even the apache-backed httpclient was also removed.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!