Skip to main content

Running Your First Selenium Test Using Agent Skills

Instead of manually setting up your Selenium project, you can use Agent Skills to let your AI coding assistant generate production-ready Selenium test automation for you.

The selenium-skill is part of TestMu AI Agent Skills - structured packages that teach AI coding assistants how to write production-grade test automation code.

What Are Agent Skills?

Agent Skills are self-contained packages of instructions, code patterns, debugging guides, and CI/CD configurations for specific testing frameworks. Once installed, your AI assistant works like a Senior QA automation architect with knowledge of:

  • Proper project structure for each framework
  • Correct dependency versions and configurations
  • Both local and TestMu AI cloud execution patterns
  • Common pitfalls and debugging approaches
  • CI/CD integration with GitHub Actions

Prerequisites

Installing the Selenium Agent Skill

Clone the repository and copy the Selenium skill into your AI tool's skills directory:

git clone https://github.com/LambdaTest/agent-skills.git

# For Claude Code
cp -r agent-skills/selenium-skill .claude/skills/

# For Cursor
cp -r agent-skills/selenium-skill .cursor/skills/

# For GitHub Copilot
cp -r agent-skills/selenium-skill .github/skills/

# For Gemini CLI
cp -r agent-skills/selenium-skill .gemini/skills/
tip

If you prefer installing all available framework skills, clone the repository directly into your tool's skills directory (e.g., .claude/skills/, .cursor/skills/).

Set Up Your Authentication

Configure your TestMu AI credentials as environment variables:

export LT_USERNAME="YOUR_LAMBDATEST_USERNAME"
export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"

Running Your First Test Using Agent Skills

Once installed, simply ask your AI assistant to write tests in natural language:

"Write Selenium tests for the login page and run them on TestMu AI cloud using Chrome and Firefox"
"Set up a Selenium Java project with TestNG, Page Object Model, and run tests on TestMu AI"
"Execute Selenium tests across 5 browsers in parallel on TestMu AI, tag the build as 'release-v1.0'"

The Agent Skill automatically handles:

  1. Project setup - Creates the right folder structure, dependencies, and config files
  2. Language detection - Maps your request to the correct language (Java, Python, JavaScript, C#, Ruby, or PHP)
  3. Execution target - Configures local or TestMu AI cloud execution based on your request
  4. Best practices - Uses explicit waits, proper locator strategies, and Page Object Model patterns

What's Included in the Selenium Skill

selenium-skill/
├── SKILL.md
└── reference/
├── playbook.md
└── advanced-patterns.md
SectionDetails
Project SetupDependencies, versions, configuration files, project structure
Core PatternsComplete, runnable code examples with best practices
Cloud IntegrationTestMu AI RemoteWebDriver and capabilities configuration
CI/CD IntegrationGitHub Actions workflows with reporting and parallel execution
Debugging Guide11+ common exceptions mapped to solutions
Best Practices14+ actionable recommendations for production code

Supported Languages and Frameworks

The Selenium Agent Skill supports 6 languages. Additionally, each framework below has its own dedicated Agent Skill with framework-specific patterns and configurations:

Java

FrameworkAgent SkillDocumentation
TestNGtestng-skillTestNG with Selenium
JUnit 5junit-5-skillJUnit with Selenium
Cucumbercucumber-skillCucumber with Selenium
Selenideselenide-skillSelenide Framework
Gaugegauge-skillGauge Framework
Gebgeb-skillGeb Framework
Serenity BDDserenity-bdd-skillSerenity BDD

JavaScript

FrameworkAgent SkillDocumentation
Mochamocha-skillMocha with Selenium
Jestjest-skillJest with Selenium
WebdriverIOwebdriverio-skillWebdriverIO
Nightwatch.jsnightwatchjs-skillNightwatch.js
Protractorprotractor-skillProtractor
TestCafetestcafe-skillTestCafe
Jasminejasmine-skillJasmine with Karma
Karmakarma-skillKarma Integration
CucumberJScucumber-skillCucumberJS
NemoJSnemojs-skillNemoJS

C#

FrameworkAgent SkillDocumentation
NUnitnunit-skillNUnit with Selenium
MSTestmstest-skillMSTest with Selenium
xUnitxunit-skillxUnit with Selenium
SpecFlowspecflow-skillSpecFlow with Selenium

Python

FrameworkAgent SkillDocumentation
pytestpytest-skillpytest with Selenium
unittestunittest-skillunittest
Robot Frameworkrobot-framework-skillRobot Framework
Behavebehave-skillBehave with Selenium
Lettucelettuce-skillLettuce with Selenium

PHP

FrameworkAgent SkillDocumentation
PHPUnitphpunit-skillPHPUnit
Behatbehat-skillBehat
Laravel Dusklaravel-dusk-skillLaravel Dusk
Codeceptioncodeception-skillCodeception

Ruby

FrameworkAgent SkillDocumentation
RSpecrspec-skillRSpec
Capybaracapybara-skillCapybara
Test::Unittestunit-skillTest::Unit

Supported AI Tools

ToolTypeInstallation Path
Claude CodeCLI.claude/skills/
GitHub CopilotExtension.github/skills/
CursorIDE.cursor/skills/
Gemini CLICLI.gemini/skills/
Codex CLICLI.codex/skills/
OpenCodeCLI.opencode/skills/
Claude.aiWebSettings → Features → Skills

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles