Skip to main content
Drama Finder is a set of Playwright helper classes designed for testing Vaadin applications. It provides typed element wrappers and convenient assertions for Vaadin components.

Requirements

Drama Finder requires:
  • Java 21 or later
  • Maven or Gradle build system
  • A Vaadin application (tested with Vaadin 25+)
  • Playwright for Java

Maven Installation

1

Add the dependency

Add Drama Finder as a test dependency in your pom.xml:
<dependency>
    <groupId>org.vaadin.addons</groupId>
    <artifactId>dramafinder</artifactId>
    <version>1.1.1-SNAPSHOT</version>
    <scope>test</scope>
</dependency>
Use the test scope since Drama Finder is only needed for testing.
2

Add Playwright dependency

Drama Finder works with Playwright for Java. Add it if not already present:
<dependency>
    <groupId>com.microsoft.playwright</groupId>
    <artifactId>playwright</artifactId>
    <version>1.55.0</version>
    <scope>test</scope>
</dependency>
3

Configure test execution

Configure the Maven Failsafe plugin for integration tests:
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>3.5.4</version>
    <executions>
        <execution>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <includes>
            <include>**/*IT.java</include>
        </includes>
    </configuration>
</plugin>
Integration tests should use the *IT.java naming convention to be picked up by Failsafe.
4

Install Playwright browsers

On first run, install Playwright browser binaries:
mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"

Gradle Installation

Add Drama Finder to your build.gradle:
dependencies {
    testImplementation 'org.vaadin.addons:dramafinder:1.1.1-SNAPSHOT'
    testImplementation 'com.microsoft.playwright:playwright:1.55.0'
}
Install Playwright browsers:
./gradlew playwright install

Spring Boot Integration

If you’re using Spring Boot for your Vaadin application, add these test dependencies:
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-spring-boot-starter</artifactId>
    <scope>test</scope>
</dependency>

Debugging Configuration

To see the browser UI during test execution (useful for debugging), add a Maven profile:
<profiles>
    <profile>
        <id>debug-ui</id>
        <properties>
            <headless>false</headless>
        </properties>
    </profile>
</profiles>
Then run tests with:
mvn -Pdebug-ui -Dit.test=YourTestIT verify
Or set the system property directly:
mvn -Dheadless=false -Dit.test=YourTestIT verify

Verify Installation

Run the Maven build to verify everything is set up correctly:
mvn clean install
For integration tests:
mvn verify
The first run may take longer as Maven downloads dependencies and Playwright downloads browser binaries.

Next Steps

Quick Start

Write your first test with Drama Finder

GitHub Repository

View source code and examples

Build docs developers (and LLMs) love