commit a6e48cac36e1afc0aad82d58baeac87361ff0784 Author: Sami Date: Tue Oct 22 11:00:03 2024 -0400 PlayWright-firstScript diff --git a/Playright/.gitignore b/Playright/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/Playright/.gitignore @@ -0,0 +1,38 @@ +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 \ No newline at end of file diff --git a/Playright/.idea/.gitignore b/Playright/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Playright/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Playright/.idea/codeStyles/Project.xml b/Playright/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..919ce1f --- /dev/null +++ b/Playright/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Playright/.idea/codeStyles/codeStyleConfig.xml b/Playright/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/Playright/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/Playright/.idea/encodings.xml b/Playright/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/Playright/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Playright/.idea/git_toolbox_blame.xml b/Playright/.idea/git_toolbox_blame.xml new file mode 100644 index 0000000..7dc1249 --- /dev/null +++ b/Playright/.idea/git_toolbox_blame.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/Playright/.idea/inspectionProfiles/Project_Default.xml b/Playright/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..66f12eb --- /dev/null +++ b/Playright/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/Playright/.idea/misc.xml b/Playright/.idea/misc.xml new file mode 100644 index 0000000..36cdbc1 --- /dev/null +++ b/Playright/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Playright/.idea/vcs.xml b/Playright/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Playright/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Playright/photo.png b/Playright/photo.png new file mode 100644 index 0000000..270f621 Binary files /dev/null and b/Playright/photo.png differ diff --git a/Playright/pom.xml b/Playright/pom.xml new file mode 100644 index 0000000..7961f38 --- /dev/null +++ b/Playright/pom.xml @@ -0,0 +1,174 @@ + + 4.0.0 + + zacksolutions + Playright + 1.0-SNAPSHOT + jar + + Playright + http://maven.apache.org + + 8 + 8 + UTF-8 + + + + + com.fasterxml.jackson.core + jackson-databind + 2.18.0 + + + + io.github.bonigarcia + webdrivermanager + 5.9.2 + + + com.aventstack + extentreports + 5.1.2 + + + + org.testng + testng + 7.10.2 + compile + + + + org.seleniumhq.selenium + selenium-java + 4.25.0 + + + + org.apache.poi + poi + 5.3.0 + + + + org.apache.poi + poi-ooxml + 5.3.0 + + + + org.apache.poi + poi-scratchpad + 5.3.0 + + + + org.apache.poi + poi-ooxml-schemas + 4.1.2 + + + + org.apache.logging.log4j + log4j-core + 2.24.1 + + + + + org.apache.logging.log4j + log4j-api + 3.0.0-beta2 + + + + org.apache.logging.log4j + log4j-slf4j2-impl + 2.24.1 + test + + + + + io.cucumber + cucumber-java + 7.19.0 + + + + io.cucumber + cucumber-testng + 7.19.0 + + + io.cucumber + cucumber-java + 7.14.1 + + + + io.rest-assured + rest-assured + 5.5.0 + test + + + + io.rest-assured + json-path + 5.5.0 + test + + + + io.rest-assured + json-schema-validator + 5.5.0 + + + + org.json + json + 20240303 + + + + com.microsoft.playwright + playwright + 1.48.0 + + + + + com.github.scribejava + scribejava-apis + 8.3.3 + runtime + + + + com.google.code.gson + gson + 2.11.0 + + + + io.rest-assured + xml-path + 5.5.0 + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + + diff --git a/Playright/src/test/java/zacksolutions/BrowserLaunchTest.java b/Playright/src/test/java/zacksolutions/BrowserLaunchTest.java new file mode 100644 index 0000000..a338c35 --- /dev/null +++ b/Playright/src/test/java/zacksolutions/BrowserLaunchTest.java @@ -0,0 +1,22 @@ +package zacksolutions; + + +import com.microsoft.playwright.Browser; +import com.microsoft.playwright.Page; +import com.microsoft.playwright.Playwright; +import org.testng.annotations.Test; + +import java.nio.file.Paths; + +public class BrowserLaunchTest { + @Test + public void browserLaunch(){ + try(Playwright playwright = Playwright.create()){ + Browser browser = playwright.chromium().launch(); + Page page = browser.newPage(); + page.navigate("https://zenful.cloud"); + System.out.println(page.title()); + page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("photo.png"))); + } + } +}