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

前端 未结 2 1769
既然无缘
既然无缘 2020-12-19 05:22

I am currently using Selenium 3.14.0 library in which org.openqa.selenium.remote.internal.ApacheHttpClient is deprecated with no other information. Which sh

相关标签:
2条回答
  • 2020-12-19 05:34

    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.

    0 讨论(0)
  • 2020-12-19 05:44

    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.
    0 讨论(0)
提交回复
热议问题