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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…