Подключение к проекту

Библиотека может быть использована в любых проектах, совместимых с java-библиотеками.

Note

Java 11 является минимальной версией, необходимой для работы библиотеки Selenium 4.x.

Откройте или создайте в IDEA java-проект, использующий JDK 11 или выше.

Добавьте в build.gradle репозиторий и зависимость от библиотеки.

Примеры подключения к проекту

Библиотека в приложении

build.gradle
java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(11)
        vendor = JvmVendorSpec.ORACLE
    }
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

repositories {
    maven { url = "https://repo.global-system.ru/artifactory/common" }
    maven { url = "https://repo.global-system.ru/artifactory/libs-release" }
}

dependencies {
    implementation 'ru.bitec.gs-automation:gs-automation:1.1.1'
    implementation 'ru.bitec.gs-automation:gs-automation-environments:1.1.1'
}

Библиотека для тестов

build.gradle
java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(11)
        vendor = JvmVendorSpec.ORACLE
    }
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

repositories {
    maven { url = "https://repo.global-system.ru/artifactory/common" }
    maven { url = "https://repo.global-system.ru/artifactory/libs-release" }
}

dependencies {
    testImplementation libs.junit.jupiter
    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

    implementation 'ru.bitec.gs-automation:gs-automation:1.1.1'
    implementation 'ru.bitec.gs-automation:gs-automation-environments:1.1.1'
    implementation 'ru.bitec.gs-automation:gs-automation-junit:1.1.1'

    testImplementation platform('org.junit:junit-bom:5.9.1')
    testImplementation 'org.junit.jupiter:junit-jupiter'
    testImplementation 'org.junit.jupiter:junit-jupiter-api'
    testImplementation 'org.junit.platform:junit-platform-suite'
}

tasks.named('test') {
    useJUnitPlatform()
}

See also