Class InstallerSessionBuilder

java.lang.Object
com.install4j.api.test.session.AbstractSessionBuilder
com.install4j.api.test.session.InstallerSessionBuilder

public final class InstallerSessionBuilder extends AbstractSessionBuilder
Builds and starts an InstallerSession for the install4j installer.
try (InstallerSession session = InstallerSessionBuilder
        .forMediaFile(new File("build/media/myapp-linux-x64.sh"))
        .installationDirectory(new File(tempDir, "install"))
        .start()) {
    session.currentScreen().clickNext();
    ...
}

Kotlin extensions

SessionExtensions.kt in this package adds useSession { ... } as a Kotlin inline extension: it calls start(), runs the trailing lambda on the resulting InstallerSession as this, and closes the session afterwards.

InstallerSessionBuilder.forMediaFile(media).useSession {
    onScreen("welcome") { clickNext() }
    // ...
}