Использую в написание тестов selenide, testng, allure. Столкнулся с проблемой, когда selenide при запуске тестов создает webDriver, потом создает его еще раз, затем убивает его, и вообще занимается вакханалией. Причем, проблема эта возникает только при запуске тестов используя maven, запуская их в православной idea - вакханалии не возникает и тесты отрабатывают, как положено.
Вывод консоли при запуске тестов с помощью maven:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
[TestNGContentHandler] [WARN] It is strongly recommended to add "<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >" at the top of your file, otherwise TestNG may fail or not work as expected.
…
… TestNG 6.14.3 by C?dric Beust (cedric@beust.com)
…
ш■ы 11, 2019 5:52:45 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
INFO: No webdriver is bound to current thread: 14 - let’s create a new webdriver
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 2402
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
ш■ы 11, 2019 5:52:50 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
ш■ы 11, 2019 5:52:52 PM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=74.0.3729.169 Platform=XP
ш■ы 11, 2019 5:52:52 PM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 5.2.4
ш■ы 11, 2019 5:52:52 PM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
ш■ы 11, 2019 5:52:52 PM com.codeborne.selenide.drivercommands.CreateDriverCommand createDriver
INFO: Create webdriver in current thread 14: ChromeDriver -> ChromeDriver: chrome on XP (709dd76c66a8676b5aedb421202b44cb)
ш■ы 11, 2019 5:52:54 PM com.codeborne.selenide.impl.UnusedWebdriversCleanupThread closeUnusedWebdrivers
INFO: Thread 14 is dead. Let’s close webdriver com.codeborne.selenide.SelenideDriver@4f5638e7
ш■ы 11, 2019 5:52:54 PM com.codeborne.selenide.drivercommands.CloseDriverCommand run
INFO: Close webdriver: 13 -> ChromeDriver: chrome on XP (709dd76c66a8676b5aedb421202b44cb)
ш■ы 11, 2019 5:52:54 PM com.codeborne.selenide.drivercommands.CloseBrowser run
INFO: Trying to close the browser ChromeDriver …
[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 12.633 s <<< FAILURE! - in TestSuite
[ERROR] checkGeneralComment(testcases.newTests.IssueListTest) Time elapsed: 9.321 s <<< FAILURE!
org.openqa.selenium.InvalidSelectorException:
Invalid selector
For documentation on this error, please visit: /documentation/webdriver/troubleshooting/errors/
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘CA-PC0HHK3C’, ip: ‘10.82.66.65’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_112’
Driver info: driver.version: unknown
at testcases.newTests.IssueListTest.checkGeneralComment(IssueListTest.java:232)
Caused by: java.lang.IllegalStateException: No webdriver is bound to current thread: 14. You need to call open(url) first.
at testcases.newTests.IssueListTest.checkGeneralComment(IssueListTest.java:232)
Вывод консоли при запуске тестов в Idea:
INFO: No webdriver is bound to current thread: 1 - let’s create a new webdriver
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 44935
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
июл 11, 2019 5:45:36 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
июл 11, 2019 5:45:37 PM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=74.0.3729.169 Platform=XP
июл 11, 2019 5:45:37 PM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 5.2.4
июл 11, 2019 5:45:37 PM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
июл 11, 2019 5:45:37 PM com.codeborne.selenide.drivercommands.CreateDriverCommand createDriver
INFO: Create webdriver in current thread 1: ChromeDriver -> ChromeDriver: chrome on XP (11909ce0ace922817977cf75c32016ee)
===============================================
Default Suite
Total tests run: 1, Failures: 0, Skips: 0
===============================================
Process finished with exit code 0
pom.xml
<groupId>isu.test</groupId>
<artifactId>ISUTest</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<aspectj.version>1.8.10</aspectj.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<inherited>true</inherited>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>externalConfig\testng.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine> -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar" </argLine>
<systemPropertyVariables>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.141.59</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.141.59</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.141.59</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>5.2.4</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-selenide</artifactId>
<version>2.12.1</version>
</dependency>
</dependencies>
Помогите, спасите)