Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am currently using Selenium 3.14.0 library in which org.openqa.selenium.remote.internal.ApacheHttpClient is deprecated with no other information. Which should be used instead?

The class is already removed in the next version, 3.141.59.

I am using it with EdgeDriver Service like following:

final int connectionTimeout = 2 * 60 * 1000;
final int socketTimeout = 10 * 60 * 1000; // 10 minute timeout
final ApacheHttpClient.Factory clientFactory = new ApacheHttpClient.Factory(
    new HttpClientFactory(connectionTimeout, socketTimeout));

...

edgeDriverService = new EdgeDriverService.Builder()
                        .usingDriverExecutable(edgeDriver)
                        .usingAnyFreePort()
                        .build();
edgeDriverService.start();
HttpCommandExecutor executor = new HttpCommandExecutor(
    new HashMap<>(), edgeDriverService.getUrl(), clientFactory);
WebDriver driver = new RemoteWebDriver(executor, new EdgeOptions());
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
994 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...