Created
October 9, 2024 16:19
-
-
Save mrk-andreev/b024fe73f71c64cf9a3e63d28a481784 to your computer and use it in GitHub Desktop.
Gradle seleniumhq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id("java") | |
} | |
group = "org.example" | |
version = "1.0-SNAPSHOT" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
testImplementation(platform("org.junit:junit-bom:5.10.0")) | |
testImplementation("org.junit.jupiter:junit-jupiter") | |
testImplementation("org.seleniumhq.selenium:selenium-java:4.25.0") | |
implementation("org.seleniumhq.selenium:selenium-chrome-driver:4.25.0") | |
} | |
tasks.test { | |
useJUnitPlatform() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.jupiter.api.Test; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
public class MainTest { | |
@Test | |
void test() { | |
WebDriver driver = new ChromeDriver(); | |
driver.get("https://selenium.dev"); | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment