I have a problem when I run my job on GitHub.
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
This is my .yaml file.
main.yaml
name: Java CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Check if ChromeDriver is installed
run: chromedriver --version || echo "ChromeDriver is not installed"
- name: Check if Chrome is installed
run: google-chrome --version || echo "Chrome is not installed"
- name: Cache the Maven packages to speed up build
uses: actions/cache@v2 # Update to v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Run tests
run: mvn clean test -Dcucumber.options="--tags @Test"
I’m using this serenity.properties file for my driver but for some reason, the GitHub doesn’t detect my driver.
serenity.properties
serenity.project.name=SELENIUM FRAMEWORK
serenity.test.root=org.example
webdriver.driver=chrome
webdriver.autodownload=true
serenity.browser.maximized=true
serenity.use.unique.browser=false
serenity.restart.browser.each.scenario=true
Hope you can help me,
Thank you in advance.