geb-skill
Generates Geb browser automation tests in Groovy with Spock framework integration.
Community author
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- MIT (permissive)
- Pin
- e2d7423pinned Oct 9, 2026
- Context cost
- about 900 tokenswhen the skill loads
- GitHub stars
- 376on lambdatest/agent-skills
- Scripts
- None found
What it does
“Generates Geb browser automation tests in Groovy with Spock integration. jQuery-like content DSL and page object pattern. Use when user mentions "Geb", "Groovy test", "GebSpec", "Browser.drive". Triggers on: "Geb", "GebSpec", "Groovy browser test", "Browser.drive".”
Generated summary from the skill's own text
Generates Geb browser automation tests in Groovy with Spock framework integration. Uses jQuery-like selectors and page object patterns to write end-to-end tests against web applications. Supports both local browser automation and cloud execution via LambdaTest.
When to use it
- Writing automated UI tests in Groovy with Spock framework
- Testing web applications with page object model pattern
- Running browser tests on cloud platforms like LambdaTest
- Building CI/CD pipelines for end-to-end testing with Gradle
When not to
- Projects requiring non-Groovy test languages or frameworks
- Simple API-only testing without browser interaction required
- Teams unfamiliar with Groovy or Spock testing patterns
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add lambdatest/agent-skills --skill geb-skillInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install lambdatest/agent-skills geb-skill@e2d7423a899f2bef8ccf53b3a6edd15465075684Installs the commit we checked (e2d7423).
Copy by hand
Download the folder at e2d7423 and put it in .claude/skills/geb-skill for Claude Code and in .agents/skills/geb-skill for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "geb-skill" by LambdaTest. Source, pinned to commit e2d7423a899f2bef8ccf53b3a6edd15465075684: https://github.com/lambdatest/agent-skills/tree/e2d7423a899f2bef8ccf53b3a6edd15465075684/geb-skill 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/geb-skill/ for Claude Code and .agents/skills/geb-skill/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/lambdatest/geb-skill
SKILL.md at the pin
---
name: geb-skill
description: >
Generates Geb browser automation tests in Groovy with Spock integration.
jQuery-like content DSL and page object pattern. Use when user mentions "Geb",
"Groovy test", "GebSpec", "Browser.drive". Triggers on: "Geb", "GebSpec",
"Groovy browser test", "Browser.drive".
languages:
- Groovy
category: e2e-testing
license: MIT
metadata:
author: TestMu AI
version: "1.0"
---
# Geb Automation Skill
For TestMu AI cloud execution, see [reference/cloud-integration.md](reference/cloud-integration.md) and [shared/testmu-cloud-reference.md](../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")
loginButton.click()
then:
at LoginPage
errorMessage.displayed
errorMessage.text().contains("Invalid")
}
}
```
### Page Objects
```groovy
class LoginPage extends geb.Page {
static url = "/login"
static at = { title == "Login" }
static content = {
emailInput { $("#email") }
passwordInput { $("#password") }
loginButton { $("button[type='submit']") }
errorMessage(required: false) { $(".error") }
}
}
class DashboardPage extends geb.Page {
static url = "/dashboard"
static at = { $(".dashboard").displayed }
static content = {
welcomeMessage { $(".welcome") }
userName { $(".user-name") }
}
}
```
### Navigator API
```groovy
$("css-selector")
$("div", class: "active")
$("input", name: "email")
$("div.items li", 0) // First match
$("div.items li").size() // Count
// Actions
element.click()
element.value("text")
element << "text" // Append text
element.text()
element.displayed
element.@href // Attribute
```
### Cloud: `driver = new RemoteWebDriver(new URL(gridUrl), caps)`
## Setup: Gradle with `geb-spock` and `selenium-support` dependencies
### Cloud Execution on TestMu AI
Set environment variables: `LT_USERNAME`, `LT_ACCESS_KEY`
```groovy
// GebConfig.groovy
environments {
lambdatest {
driver = {
def ltOptions = [
user: System.getenv("LT_USERNAME"),
accessKey: System.getenv("LT_ACCESS_KEY"),
build: "Geb Build",
name: "Geb Test",
platformName: "Windows 11",
video: true,
console: true,
network: true,
]
def caps = new ChromeOptions()
caps.setCapability("LT:Options", ltOptions)
new RemoteWebDriver(
new URL("https://hub.lambdatest.com/wd/hub"), caps)
}
}
}
```
Run: `./gradlew test -Dgeb.env=lambdatest`
## Run: `./gradlew test`
## Deep Patterns
See `reference/playbook.md` for production-grade patterns:
| Section | What You Get |
|---------|-------------|
| §1 Project Setup | build.gradle, GebConfig.groovy, environments, waiting config |
| §2 Page Objects | Content DSL, at checks, modules for reusable components |
| §3 Spec Tests | Spock integration, data-driven with @Unroll, @Stepwise flows |
| §4 Waiting & Async | Waiting presets, JavaScript interaction, alerts/confirms |
| §5 Advanced Patterns | File upload/download, windows, frames, custom extensions |
| §6 API Testing | REST API specs with Groovy JsonSlurper |
| §7 CI/CD Integration | GitHub Actions with headless Chrome, Gradle caching |
| §8 Debugging Table | 12 common problems with causes and fixes |
| §9 Best Practices | 14-item Geb testing checklist |
From lambdatest/agent-skills at e2d7423, shown as plain text under its license: MIT (permissive). The license text is in geb-skill/SKILL.md.
View SKILL.md on GitHub at e2d7423Files
- SKILL.md4.0 KB · 97d4eea543d7
- reference/
- advanced-patterns.md2.5 KB · 435019274c93
- cloud-integration.md735 B · 43a72697a8ba
- playbook.md20 KB · 20eb4b6875e2
4 files, 27 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at e2d7423Related in Testing and QA
next-partial-prefetching-optimizer
This skill optimizes Next.js client-side navigation under Partial Prefetching by defining what UI loads before and after a click.
by VercelOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.8K tokens · pinned 6 days ago
Invalid--Name
This skill cannot be described because its name format is invalid and no functional description or instructions are provided in the skill metadata.
by CrewAIOfficial publisher
Claude Code, Codex, Cursor +4 · about 0 tokens · pinned 6 days ago
chrome-devtools-cli
This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.
by GoogleOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago
triaging-visual-review-runs
Inspects PostHog Visual Review screenshot regression runs that gate pull requests, helping engineers triage diff results, identify flaky stories, and decide…
by PostHogOfficial publisher
Claude Code, Codex, Cursor +4 · about 8.9K tokens · pinned 6 days ago
code-change-verification
Runs formatting, linting, type checking, and test verification for SDK code changes after review.
by OpenAIOfficial publisher
Contains scripts
Codex · about 1.3K tokens · pinned 6 days ago
runtime-behavior-probe
This skill guides agents to plan and execute controlled runtime investigations with explicit user approval before each probe runs.
by OpenAIOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.8K tokens · pinned 6 days ago