mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 16:25:49 +00:00
playwright integration
This commit is contained in:
parent
4926e29270
commit
d932479bef
10 changed files with 41 additions and 0 deletions
BIN
src/test/playwright/demo/example.png
Normal file
BIN
src/test/playwright/demo/example.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
22
src/test/playwright/demo/pom.xml
Normal file
22
src/test/playwright/demo/pom.xml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
|
<artifactId>playwright</artifactId>
|
||||||
|
<version>1.37.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<groupId>com.example</groupId>
|
||||||
|
<artifactId>demo</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
14
src/test/playwright/demo/src/main/java/com/example/Main.java
Normal file
14
src/test/playwright/demo/src/main/java/com/example/Main.java
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
package com.example;
|
||||||
|
import com.microsoft.playwright.*;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try (Playwright playwright = Playwright.create()) {
|
||||||
|
Browser browser = playwright.webkit().launch();
|
||||||
|
Page page = browser.newPage();
|
||||||
|
page.navigate("https://playwright.dev/");
|
||||||
|
page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("example.png")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
src/test/playwright/demo/target/classes/com/example/Main.class
Normal file
BIN
src/test/playwright/demo/target/classes/com/example/Main.class
Normal file
Binary file not shown.
BIN
src/test/playwright/demo/target/demo-1.0-SNAPSHOT.jar
Normal file
BIN
src/test/playwright/demo/target/demo-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
artifactId=demo
|
||||||
|
groupId=com.example
|
||||||
|
version=1.0-SNAPSHOT
|
|
@ -0,0 +1 @@
|
||||||
|
com\example\Main.class
|
|
@ -0,0 +1 @@
|
||||||
|
C:\dev\spring-petclinic2\src\test\playwright\demo\src\main\java\com\example\Main.java
|
Loading…
Reference in a new issue