Многопоточность в автоматизации тестирования
Всем привет. Пытаюсь решить проблему с параллельным запуском автотестов. Судя по allure репортам, выполняются они в несколько потоков, однако при закрытии сессии браузера в одном тесте в аннотации @AfterEach, в остальных тестах вылетает NoSuchSessionException. Использую WebDriverFactory и PageObject, статики убрал везде где мог, а сам драйвер обернул в ThreadLocal. После этих действий проблема все еще не была решена.
Тестовые классы наследуются от baseTest, где и происходит вызов драйвера, вместе с @BeforeEach и @AfterEach.
Классы запускаю в same_thread, методы в concurrent.
Прошу помощи и по возможности посоветуйте различного материала для изучения использования Selenium, паттернов, многопоточности.
BaseTest:
public class BaseTest {
private WebDriverFactory wbf = new WebDriverFactory();
public ThreadLocal<WebDriver> driver;
private Logger logger = LogManager.getLogger(BaseTest.class);
String os = System.getProperty("os.name");
Random random = new Random();
//Необходимы постоянно новые значение
String phoneNumber = String.format("%09d", random.nextInt(999999999));
String emailName = String.format("%09d", random.nextInt(999999999));
String email = emailName + "@mail.ru";
String seriesDoc = String.format("%04d", random.nextInt(9999));
String numberDoc = String.format("%06d", random.nextInt(999999));
String snils = "39638621635";
String testPhotoPath = getTestPhotoPath();
String testPhotoHugePath = getTestPhotoHugePath();
String testPdfPath = getTestPdfPath();
public ClientBuilder builder = new ClientBuilder(
new String(this.phoneNumber),
new String(this.email),
new String(this.seriesDoc),
new String(this.numberDoc),
new String(this.snils),
new String(this.testPhotoPath),
new String(this.testPhotoHugePath),
new String(this.testPdfPath)
);
@BeforeEach
public void setUp() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
String os = System.getProperty("os.name");
if (os.contains("Windows")) {
this.testPhotoPath = System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testphotopathwindows");
this.testPhotoHugePath = System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testhugephotowindows");
this.testPdfPath = System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testpdfwindows");
} else {
this.testPhotoPath = System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testphotopathubuntu");
this.testPhotoHugePath = System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testhugephotoubuntu");
this.testPdfPath = System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testpdfubuntu");
}
//-Dbrowser
String browser = System.getProperty("browser", "chrome").toLowerCase();
//-Dstrategy
String strategy = System.getProperty("strategy", "NORMAL").toUpperCase();
driver = new ThreadLocal<>();
driver.set(wbf.getDriver(BrowserName.fromString(browser), StrategyName.fromString(strategy)));
logger.info(driver.hashCode());
logger.info("Драйвер запущен");
}
@AfterEach
public void setDown() {
logger.info(driver.hashCode());
if(getDriver() != null) {
getDriver().quit();
logger.info("Драйвер остановлен");
}
driver.remove();
}
public String getTestPhotoPath() {
if (os.contains("Windows")) {
return System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testphotopathwindows");
} else {
return System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testphotopathubuntu");
}
}
public String getTestPhotoHugePath() {
if (os.contains("Windows")) {
return System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testhugephotowindows");
} else {
return System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testhugephotoubuntu");
}
}
public String getTestPdfPath() {
if (os.contains("Windows")) {
return System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testpdfwindows");
} else {
return System.getProperty("user.dir") + PropertiesFile.readPropertiesFile("testpdfubuntu");
}
}
public WebDriver getDriver() {
return driver.get();
}
WebDriverFactory:
public class WebDriverFactory {
private static Logger logger = LogManager.getLogger(WebDriverFactory.class);
protected WebDriver driver;
public WebDriver getDriver(BrowserName name, StrategyName strategy) {
switch (name) {
case CHROME:
ChromeBrowser chromeBrowser = new ChromeBrowser();
logger.info("Драйвер для браузера Chrome");
driver = chromeBrowser.getDriver(strategy);
return driver;
case EDGE:
EdgeBrowser edgeBrowser = new EdgeBrowser();
logger.info("Драйвер для браузера Edge");
driver = edgeBrowser.getDriver(strategy);
return driver;
case FIREFOX:
FirefoxBrowser firefoxBrowser = new FirefoxBrowser();
logger.info("Драйвер для браузера FireFox");
driver = firefoxBrowser.getDriver(strategy);
return driver;
default:
throw new RuntimeException("Некорректное имя браузера");
}
}
}
BasePage:
public abstract class BasePage {
protected WebDriver driver;
public BasePage(WebDriver driver) {
this.driver = driver;
WaitFor.initWait(driver, Duration.ofSeconds(40), Duration.ofMillis(10000));
JSExecutor.initJS(driver);
}
public abstract void success(Client client);
public abstract void success();
}
public class RegistrationStepOnePage extends BasePage {
public RegistrationStepOnePage(WebDriver driver) {
super(driver);
}
private Logger logger = LogManager.getLogger(RegistrationStepOnePage.class);
//----Локаторы----
//Поле "Фамилия"
String surNameXpath = "//input[@id='surname']";
//
//Методы
public RegistrationStepOne textBoxSurnameSetValue(String surname) {
//
}
ChromeBrowser:
public class ChromeBrowser {
public RemoteWebDriver getDriver(StrategyName strategy) {
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
options.addArguments("--no-sandbox");
options.addArguments("--incognito");
options.addArguments("--start-fullscreen");
options.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
switch (strategy) {
case NORMAL:
options.setCapability(CapabilityType.PAGE_LOAD_STRATEGY, PageLoadStrategy.NORMAL);
break;
case NONE:
options.setCapability(CapabilityType.PAGE_LOAD_STRATEGY, PageLoadStrategy.NONE);
break;
case EAGER:
options.setCapability(CapabilityType.PAGE_LOAD_STRATEGY, PageLoadStrategy.EAGER);
break;
default:
throw new RuntimeException("Неправильное имя стратегии. Используйте NORMAL/EAGER/NONE");
}
options.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
return new ChromeDriver(options);
}
}
junit-platform-properties:
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
junit.jupiter.execution.parallel.config.strategy = custom
junit.jupiter.execution.parallel.config.custom.class = resources.CustomStrategyParallelism
CustomStrategyParallelism:
public class CustomStrategyParallelism implements ParallelExecutionConfiguration, ParallelExecutionConfigurationStrategy {
@Override
public int getParallelism() {
return 4;
}
@Override
public int getMinimumRunnable() {
return 4;
}
@Override
public int getMaxPoolSize() {
return 4;
}
@Override
public int getCorePoolSize() {
return 4;
}
@Override
public int getKeepAliveSeconds() {
return 30;
}
@Override
public ParallelExecutionConfiguration createConfiguration(final ConfigurationParameters configurationParameters) {
return this;
}
}
1 из тестов:
public class PageOneFieldsTest extends BaseTest {
private Logger logger = LogManager.getLogger(PageOneFieldsTest.class);
@Test
//Тест ввода неверной фамилии
public void illegalSurnameTest() {
try {
logger.info("Запущен тест ввода неверной фамилии");
Client client = startPageSuccess();
RegistrationStepOnePage regOnePage = new RegistrationStepOnePage(getDriver());
regOnePage.textBoxSurNameSetValue("Testov")
.textBoxNameSetValue(PropertiesFile.readPropertiesFile("name"))
.textBoxFatherNameSetValue(PropertiesFile.readPropertiesFile("fathername"))
.textBoxEmailSetValue(client.getEmail())
.textBoxPhoneNumberSetValue(client.getPhoneNumber())
.buttonSmsButtonClick()
.textBoxSmsCodeSetValue(PropertiesFile.readPropertiesFile("smscode"))
.checkBoxTermsOfUseSetChecked()
.illegalNamesErrorAssert()
.assertContinueNotClickable();
} finally {
Screenshoter.makeScreenshot("png", "illegalSurnameTest", getDriver());
}
}
}
Такой стектрейс зачастую выпадает:
org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'WS-CHERNECOV', ip: '192.168.3.65', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, findElement {using=xpath, value=//div[input[@id='email']]//div[@id='0item']}]
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 96.0.4664.45, chrome: {chromedriverVersion: 96.0.4664.45 (76e4c1bb2ab46..., userDataDir: C:\Users\CHERNE~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:60606}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:60606/devtoo..., se:cdpVersion: 96.0.4664.45, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: ignore, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:145)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:139)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559)
at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:162)
at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:60)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:383)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:375)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:197)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:193)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at helpers.WaitFor.visibilityOfElementLocated(WaitFor.java:31)
at web.pages.elements.Button.click(Button.java:14)
at web.pages.client.registration.RegistrationStepOnePage.textBoxEmailSetValue(RegistrationStepOnePage.java:116)
at tests.client.registration.PageOneFieldsTest.emptyFatherNameTest(PageOneFieldsTest.java:211)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Бывает и такой:
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'WS-CHERNECOV', ip: '192.168.3.65', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [ebe6219244ab24d7bee1509c4d23cf5b, findElement {using=xpath, value=//div[input[@id='email']]//div[@id='0item']}]
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 96.0.4664.45, chrome: {chromedriverVersion: 96.0.4664.45 (76e4c1bb2ab46..., userDataDir: C:\Users\CHERNE~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:60758}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:60758/devtoo..., se:cdpVersion: 96.0.4664.45, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: ignore, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: ebe6219244ab24d7bee1509c4d23cf5b
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:583)
at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:162)
at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:60)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:383)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:375)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:197)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:193)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at helpers.WaitFor.visibilityOfElementLocated(WaitFor.java:31)
at web.pages.elements.Button.click(Button.java:14)
at web.pages.client.registration.RegistrationStepOnePage.textBoxEmailSetValue(RegistrationStepOnePage.java:116)
at tests.client.registration.PageOneFieldsTest.illegalFatherNameTest(PageOneFieldsTest.java:75)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.io.UncheckedIOException: java.net.ConnectException: Connection refused: no further information: localhost/[0:0:0:0:0:0:0:1]:55312
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:80)
at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56)
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.execute(NettyHttpHandler.java:51)
at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56)
at org.openqa.selenium.remote.http.netty.NettyClient.execute(NettyClient.java:119)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:181)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:139)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559)
... 49 more
Caused by: java.net.ConnectException: Connection refused: no further information: localhost/[0:0:0:0:0:0:0:1]:55312
at org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:179)
at org.asynchttpclient.netty.channel.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:108)
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28)
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:321)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:707)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/[0:0:0:0:0:0:0:1]:55312
Caused by: java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:944)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:707)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:831)