geb-skill
geb-skill enables you to build and run Geb-based browser automation tests using Groovy and Spock framework. Streamline your web testing by automating test execution, page object modeling, and assertion validation directly through your agent workflows.
geb-skill lets you write Geb browser automation tests in Groovy using the Spock testing framework. You define test cases that interact with web pages through Geb's Navigator API, which provides jQuery-like selectors and methods to click elements, fill forms, and validate page state. Each test is written as a Spock specification, allowing you to use given-when-then syntax and powerful assertions to verify browser behavior and application responses.
AI-generated summary based on this skill's SKILL.md
Install
LambdaTest/agent-skills/geb-skill · repository language: Python
git clone https://github.com/LambdaTest/agent-skills
cp -r agent-skills/geb-skill ~/.claude/skills/geb-skillFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I write Geb browser automation tests?
geb-skill lets you write Geb browser automation tests in Groovy using the Spock testing framework. You define test cases that interact with web pages through Geb's Navigator API, which provides jQuery-like selectors and methods to click elements, fill forms, and validate page state. Each test is written as a Spock specification, allowing you to use given-when-then syntax and powerful assertions to verify browser behavior and application responses.
What is the Geb page object pattern and how do I build page objects using Geb's DSL?
geb-skill supports building page objects using Geb's jQuery-like DSL and content API. Page objects encapsulate the structure and behavior of a web page, defining elements through selectors and grouping related interactions. Using Geb's content DSL, you declare page elements as properties with CSS or XPath selectors, then interact with them through the Navigator API. This pattern keeps your tests maintainable by separating page structure from test logic and making selector changes centralized.
How can I configure Geb for cloud execution on LambdaTest or RemoteWebDriver?
geb-skill enables you to configure Geb for cloud execution by setting up RemoteWebDriver capabilities pointing to cloud providers like LambdaTest. You specify the remote URL, browser type, version, and platform in your Geb configuration file, then Geb routes all browser commands to the cloud service. This allows you to run your Groovy and Spock tests across multiple browsers and operating systems without maintaining local infrastructure, integrating seamlessly with your CI/CD pipelines.
How do I handle asynchronous interactions, waiting, and advanced browser patterns in Geb?
geb-skill provides built-in waiting mechanisms to handle asynchronous interactions and JavaScript execution. You can use Geb's waitFor() method to poll for conditions like element visibility, text changes, or AJAX completion before proceeding. The Navigator API also supports chaining and implicit waits configured globally. For advanced patterns, you can combine Spock's where blocks for data-driven tests, use browser.drive() for multi-step workflows, and leverage Geb's content DSL to define dynamic element collections that update as the page state changes.
How do I integrate Geb tests into CI/CD pipelines with Gradle and GitHub Actions?
geb-skill integrates with CI/CD pipelines by using Gradle as your build tool and GitHub Actions as your automation platform. Define your Geb dependencies and test tasks in build.gradle, then create a GitHub Actions workflow that checks out your code, runs gradle test, and reports results. geb-skill supports parallel test execution, cloud provider integration for remote browsers, and artifact capture. Your workflow can trigger on push or pull request events, ensuring every code change is validated through automated browser tests before merging.
What does geb-skill enable for web testing automation?
geb-skill enables you to build and run Geb-based browser automation tests using Groovy and Spock framework. It streamlines your web testing by automating test execution, page object modeling, and assertion validation directly through your agent workflows. You can write expressive tests with jQuery-like selectors, manage complex page interactions, configure cloud-based browser execution, and integrate everything into your CI/CD pipeline with Gradle and GitHub Actions for continuous validation of your web applications.
SKILL.md
rendered from the published skill — quoted content, verbatim
Geb Automation Skill
For TestMu AI cloud execution, see reference/cloud-integration.md and shared/testmu-cloud-reference.md.
Core Patterns
Basic Test (Spock)
```groovy import geb.spock.GebSpec
class LoginSpec extends GebSpec { def "login with valid credentials"() { when: to LoginPage emailInput.value("user@test.com") passwordInput.value("password123") loginButton.click()
then:
at DashboardPage
welcomeMessage.text().contains("Welcome")
}
def "login shows error for invalid credentials"() {
when:
to LoginPage
emailInput.value("wrong@test.com")
passwordInput.value("wrong")
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 4 files
geb-skill/SKILL.md
geb-skill/reference/advanced-patterns.md
geb-skill/reference/cloud-integration.md
geb-skill/reference/playbook.md