🚀 Getting Started with WebUI
1) Add the dependency
Maven
<dependency>
<groupId>io.github.toobprojects</groupId>
<artifactId>qabase-webui</artifactId>
</dependency>
Gradle (Kotlin DSL)
dependencies {
testImplementation(platform("io.github.toobprojects:qabase-framework:2.2.0"))
testImplementation("io.github.toobprojects:qabase-webui")
}
2) Minimal UI test with UI & Sel
import com.toob.qabase.QaBaseTest
import com.toob.qabase.webui.dsl.UI
import com.toob.qabase.webui.dsl.Sel
import org.junit.jupiter.api.Test
@QaBaseTest
class HomePageTest {
@Test
fun canSeeProductsLink() {
UI.visit("/") // uses qabase.webui.base-url
.shouldSee("a[href='/products']", "Products")
Sel.css("a[href='/products']").click()
UI.shouldSeeText("All Products")
}
}
Failures automatically attach screenshot + pageSource to Allure when enabled.
🔗 See it in action
Want to see a real-world project using these patterns? Check out the QA Automation Exercise.com.