What happened?
Issue :
java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set by the webdriver.chrome.driver system property
Steps :
- Add 4.6.0 to POM
- run test in a jenkins server
Results :
10:34:49.999 [pool-1-thread-1] WARN o.o.s.remote.service.DriverService - Unable to obtain driver using Selenium Manager: Error running command: [/tmp/selenium-manager20252854139289024732448555598337657/selenium-manager, --driver, chromedriver]
POM :
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.testframework</groupId>
<artifactId>testframework</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Automation UI Test Framework</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven-download-plugin.version>1.3.0</maven-download-plugin.version>
<maven-surefire.version>3.0.0-M4</maven-surefire.version>
<logback-classic.version>1.2.3</logback-classic.version>
<slf4j.version>1.7.25</slf4j.version>
<owner.version>1.0.8</owner.version>
<testng.version>6.14.3</testng.version>
<webdrivermanager.version>5.3.0</webdrivermanager.version>
<lombok.version>1.18.22</lombok.version>
<hamcrest-all.version>1.3</hamcrest-all.version>
<selenium-java.version>4.6.0</selenium-java.version>
<junit.version>4.12</junit.version>
<common-io.version>2.6</common-io.version>
<cucumber.version>6.9.1</cucumber.version>
<cucumber-html.version>0.2.7</cucumber-html.version>
<cucumber-jvm-deps.version>1.0.6</cucumber-jvm-deps.version>
<cluecumber-report.version>2.3.1</cluecumber-report.version>
<gherkin.version>16.0.0</gherkin.version>
<gson.version>2.8.6</gson.version>
<json-simple.version>1.1.1</json-simple.version>
<skipStaticAnalysis>false</skipStaticAnalysis>
<rest_assured.version>4.2.0</rest_assured.version>
<spring.version>5.3.13</spring.version>
<spring-boot.version>2.5.0</spring-boot.version>
<groovy.version>3.0.5</groovy.version>
<mysql.version>5.1.39</mysql.version>
<mariadb.version>1.5.5</mariadb.version>
<json.version>20211205</json.version>
<vavr.version>0.9.0</vavr.version>
<junit-vintage.version>5.7.2</junit-vintage.version>
<aspectj.version>1.9.2</aspectj.version>
<allure.version>2.17.3</allure.version>
<allure.maven.plugin.version>2.8</allure.maven.plugin.version>
<allure.cli.version>2.17.3</allure.cli.version>
<maven.exec.plugin.version>3.0.0</maven.exec.plugin.version>
<netty-handler.version>4.1.85.Final</netty-handler.version>
<jackson-databind.version>2.9.8</jackson-databind.version>
<pdf-box.version>3.0.0-RC1</pdf-box.version>
<sikulix.version>2.0.5</sikulix.version>
<qtest-java-sdk.version>1.4.10</qtest-java-sdk.version>
<open.csv.version>5.6</open.csv.version>
<jackson-dataformat-csv.version>2.13.3</jackson-dataformat-csv.version>
<appium.version>8.2.1</appium.version>
</properties>
<dependencies>
<!--Java core-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest-all.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.httpcache4j.uribuilder</groupId>
<artifactId>uribuilder</artifactId>
<version>2.0.0</version>
</dependency>
<!--Cucumber Selenium requirements-->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium-java.version}</version>
</dependency>
<!--Appium-->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.version}</version>
</dependency>
<!-- netty explicit dependency is required for selenium to remove conflicts with other netty versions -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>${netty-handler.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>${cucumber.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-html</artifactId>
<version>${cucumber-html.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>gherkin</artifactId>
<version>${gherkin.version}</version>
</dependency>
<!--Properties file mapper-->
<dependency>
<groupId>org.aeonbits.owner</groupId>
<artifactId>owner</artifactId>
<version>${owner.version}</version>
</dependency>
<!--HTTP Calls / JSON modifier-->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>${rest_assured.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>${json-simple.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
<!--Dependency Injection : Spring & Cucumber State Transfer-->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- vavr dependency for fluent try catch blocks -->
<dependency>
<groupId>io.vavr</groupId>
<artifactId>vavr</artifactId>
<version>${vavr.version}</version>
</dependency>
<!--JUnit Parallel Test Run Dependencies-->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<!--Database hooks-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<!-- reporting dependencies -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber6-jvm</artifactId>
<version>${allure.version}</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-rest-assured</artifactId>
<version>${allure.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
<!--pdf parser dependency-->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdf-box.version}</version>
</dependency>
<!-- csv parser dependency -->
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>${open.csv.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId>
<version>${jackson-dataformat-csv.version}</version>
</dependency>
<!--QTest integration dependency-->
<dependency>
<groupId>com.qasymphony.qtest</groupId>
<artifactId>qtest-sdk-java</artifactId>
<version>${qtest-java-sdk.version}</version>
</dependency>
<!--image validation dependency-->
<dependency>
<groupId>com.sikulix</groupId>
<artifactId>sikulixapi</artifactId>
<version>${sikulix.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-surefire.version}</version>
<executions>
<execution>
<id>Initial Test Run</id>
<phase>test</phase>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<argLine>-Duser.timezone=Canada/Mountain</argLine>
<excludes>
<exclude>**/DeveloperTools.java</exclude>
<exclude>**/FailedTestReRunnerIT.java</exclude>
</excludes>
<parallel>methods</parallel>
<threadCount>8</threadCount>
<perCoreThreadCount>false</perCoreThreadCount>
<rerunFailingTestsCount>1</rerunFailingTestsCount>
</configuration>
</execution>
<execution>
<id>Verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>${allure.maven.plugin.version}</version>
<configuration>
<reportDirectory>target/allure-report</reportDirectory>
<reportingOutputDirectory>target/allure-report</reportingOutputDirectory>
<reportVersion>${allure.cli.version}</reportVersion>
<allureDownloadUrl>
https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/%s/allure-commandline-%s.zip
</allureDownloadUrl>
</configuration>
<executions>
<execution>
<id>Test Report</id>
<phase>post-integration-test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<skip>${skipStaticAnalysis}</skip>
<consoleOutput>true</consoleOutput>
<configLocation>build_config/checkstyle.xml</configLocation>
<propertyExpansion>basedir=${project.basedir}</propertyExpansion>
<violationSeverity>info</violationSeverity>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<sourceDirectories>
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- below plugin is used for pos batch execution-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.plugin.version}</version>
<executions>
<execution>
<id>user-sync-batch</id>
<configuration>
<mainClass>com.core.batches.user.UserSyncBatchRunner</mainClass>
</configuration>
</execution>
<execution>
<id>workstation-sync-batch</id>
<configuration>
<mainClass>com.core.batches.workstation.WorkStationSyncBatchRunner</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Note :
Running the same test locally, after deleting all the initial webdrivers, it runs fine.
Local machine spec: MacOS Ventura ( intel chip )
Running 4.6.0 with Bonni's WebDriverManager in Jenkins ( Linux )
11:08:26.679 [pool-1-thread-3] INFO c.pos.stepdefinitions.CucumberHooks - Thread - 14 - Scenario - MKS - Go to Inventory Lookup app and do a basic SKU search.
11:08:28.700 [pool-1-thread-3] INFO i.g.bonigarcia.wdm.WebDriverManager - Using chromedriver 87.0.4280.88 (resolved driver for Chrome 87)
11:08:28.731 [pool-1-thread-3] INFO i.g.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
11:08:29.473 [pool-1-thread-3] INFO i.g.bonigarcia.wdm.online.Downloader - Downloading https://chromedriver.storage.googleapis.com/87.0.4280.88/chromedriver_linux64.zip
11:08:30.050 [pool-1-thread-3] INFO i.g.bonigarcia.wdm.online.Downloader - Extracting driver from compressed file chromedriver_linux64.zip
11:08:30.167 [pool-1-thread-3] INFO i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /home/jenkins/.cache/selenium/chromedriver/linux64/87.0.4280.88/chromedriver
Starting ChromeDriver 87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}) on port 25532
Environments
Selenium 4.6.0 / 4.7.0( without Boni's webDriverManager )
- Linux - Chrome 87
-- Where the failure is seen.
- macOS Ventura - Chrome 108
-- Runs as expected, chrome driver is downloaded and executes the test.
Selenium 4.6.0 ( with Boni's webDriverManager )
- Linux - Chrome 87
-- Runs as expected.
- macOS Ventura - Chrome 108
-- Runs as expected, chrome driver is downloaded and executes the test.
How can we reproduce the issue?
Execute the test on a Linux machine, Jenkins.
Relevant log output
10:34:49.999 [pool-1-thread-1] WARN o.o.s.remote.service.DriverService - Unable to obtain driver using Selenium Manager: Error running command: [/tmp/selenium-manager20252854139289024732448555598337657/selenium-manager, --driver, chromedriver]
Build info: version: '4.6.0', revision: '79f1c02ae20'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.76.1.el7.x86_64', java.version: '1.8.0_275'
Driver info: driver.version: ChromeDriver
Given a default browser is opened # com.pos.stepdefinitions.steps.common.WindowHandlerSteps.openBrowser()
java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://chromedriver.chromium.org/. The latest version can be downloaded from https://chromedriver.chromium.org/downloads
at org.openqa.selenium.internal.Require$StateChecker.nonNull(Require.java:314)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:148)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:39)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:233)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:450)
at org.openqa.selenium.chrome.ChromeDriverService.createServiceWithConfig(ChromeDriverService.java:142)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:70)
at com.core.factory.webdriver.DriverSettings.startDefaultDriver(DriverSettings.java:50)
at com.core.factory.webdriver.DriverActions.openBrowser(DriverActions.java:51)
at com.pos.stepdefinitions.steps.common.WindowHandlerSteps.openBrowser(WindowHandlerSteps.java:22)
at ✽.a default browser is opened(file:///apps/jenkins/slave/workspace/Automation/Tools%20-%20Feature%20Branch%20Smoke%20Test/src/test/java/com/features/tools/smoke/PosServices_Smoke.feature:5)
Operating System
Linux ( Jenkins ) , macOS Ventura ( Local )
Selenium version
4.6.0 , 4.7.0
What are the browser(s) and version(s) where you see this issue?
Chrome 87
What are the browser driver(s) and version(s) where you see this issue?
Chrome 87, Chrome 108
Are you using Selenium Grid?
No
What happened?
Issue :
java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set by the webdriver.chrome.driver system property
Steps :
Results :
POM :
Note :
Running the same test locally, after deleting all the initial webdrivers, it runs fine.
Local machine spec: MacOS Ventura ( intel chip )
Running 4.6.0 with Bonni's WebDriverManager in Jenkins ( Linux )
Environments
Selenium 4.6.0 / 4.7.0( without Boni's webDriverManager )
-- Where the failure is seen.
-- Runs as expected, chrome driver is downloaded and executes the test.
Selenium 4.6.0 ( with Boni's webDriverManager )
-- Runs as expected.
-- Runs as expected, chrome driver is downloaded and executes the test.
How can we reproduce the issue?
Execute the test on a Linux machine, Jenkins.Relevant log output
Operating System
Linux ( Jenkins ) , macOS Ventura ( Local )
Selenium version
4.6.0 , 4.7.0
What are the browser(s) and version(s) where you see this issue?
Chrome 87
What are the browser driver(s) and version(s) where you see this issue?
Chrome 87, Chrome 108
Are you using Selenium Grid?
No