From d5490c913353e9304b11135094ee1a581e228125 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Wed, 25 Jan 2023 11:04:29 +0000 Subject: [PATCH] initial commit --- .gitignore | 41 +++++++++ pom.xml | 136 ++++++++++++++++++++++++++++ screenshots/placeholder.txt | 1 + src/main/java/org/example/App.java | 14 +++ src/main/java/org/example/App2.java | 15 +++ src/site/apt/index.apt | 18 ++++ src/site/site.xml | 14 +++ 7 files changed, 239 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 screenshots/placeholder.txt create mode 100644 src/main/java/org/example/App.java create mode 100644 src/main/java/org/example/App2.java create mode 100644 src/site/apt/index.apt create mode 100644 src/site/site.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..208856a --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store + +out/ +screenshots/*.png diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..d4036d1 --- /dev/null +++ b/pom.xml @@ -0,0 +1,136 @@ + + 4.0.0 + + org.example + PlaywrightJava1 + 1.0-SNAPSHOT + pom + + + + website + scp://webhost.company.com/www/website + + + + + UTF-8 + + + + + + io.cucumber + cucumber-bom + 7.10.1 + pom + import + + + org.junit + junit-bom + 5.9.2 + pom + import + + + + + + + + + org.junit.platform + junit-platform-suite + 1.9.2 + test + + + + + org.junit.jupiter + junit-jupiter-api + 5.9.2 + test + + + + + com.microsoft.playwright + playwright + 1.29.0 + + + + + com.microsoft.playwright + assertions + 1.17.2 + + + + + com.microsoft.playwright + driver + 1.29.0 + + + + + com.microsoft.playwright + driver-bundle + 1.29.0 + + + + + io.cucumber + cucumber-java + test + + + + io.cucumber + cucumber-junit-platform-engine + test + + + + io.cucumber + cucumber-picocontainer + test + + + + + com.google.code.gson + gson + 2.8.9 + + + + + org.opentest4j + opentest4j + 1.2.0 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + UTF-8 + + + + + + diff --git a/screenshots/placeholder.txt b/screenshots/placeholder.txt new file mode 100644 index 0000000..affb463 --- /dev/null +++ b/screenshots/placeholder.txt @@ -0,0 +1 @@ +forces git to include the folder. \ No newline at end of file diff --git a/src/main/java/org/example/App.java b/src/main/java/org/example/App.java new file mode 100644 index 0000000..985fccc --- /dev/null +++ b/src/main/java/org/example/App.java @@ -0,0 +1,14 @@ +package org.example; + +import com.microsoft.playwright.*; + +public class App { + public static void main(String[] args) { + try (Playwright playwright = Playwright.create()) { + Browser browser = playwright.chromium().launch(); + Page page = browser.newPage(); + page.navigate("http://playwright.dev"); + System.out.println(page.title()); + } + } +} \ No newline at end of file diff --git a/src/main/java/org/example/App2.java b/src/main/java/org/example/App2.java new file mode 100644 index 0000000..a409399 --- /dev/null +++ b/src/main/java/org/example/App2.java @@ -0,0 +1,15 @@ +package org.example; + +import com.microsoft.playwright.*; +import java.nio.file.Paths; + +public class App2 { + public static void main(String[] args) { + try (Playwright playwright = Playwright.create()) { + Browser browser = playwright.webkit().launch(); + Page page = browser.newPage(); + page.navigate("http://whatsmyuseragent.org/"); + page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("screenshots/example.png"))); + } + } +} \ No newline at end of file diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt new file mode 100644 index 0000000..31b6246 --- /dev/null +++ b/src/site/apt/index.apt @@ -0,0 +1,18 @@ + ----- + Title Here + ----- + Author Here + ----- + Date Here + ----- + +Maven Site for your project + + Congratulations! If you are looking at this page then you have successfully generated a + template site employing the site archetype and you have run: + ++-----+ + +mvn site + ++-----+ diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 0000000..b8d2ed8 --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + +