본문으로 건너뛰기
Skillpedia
테스트48k · #5711

selenium-skill

하는 일

이 도구는 웹사이트의 자동화 테스트 코드를 만듭니다. 사용자의 행동을 시뮬레이션해 웹사이트가 올바르게 작동하는지 확인하도록 돕습니다.

사용하는 경우

  • ✓웹사이트가 여러 브라우저에서 작동하는지 테스트하고 싶을 때.
  • ✓웹사이트 품질을 보장하기 위해 자동화 테스트를 만들어야 할 때.
  • ✓오류를 찾기 위해 웹사이트 사용을 시뮬레이션하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/selenium-skill/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/selenium-skill/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“웹사이트 X의 로그인을 확인하는 자동화 테스트를 Java로 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

프로그래밍 언어와 테스트가 실행될 위치(내 컴퓨터 또는 클라우드)를 고르면 됩니다. 도구는 모범 사례를 따라 신뢰할 수 있고 유지보수하기 쉬운 테스트 코드를 만듭니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Selenium Automation Skill

When to Use

Use this skill when you need generates production-grade Selenium WebDriver automation scripts and tests in Java, Python, JavaScript, C#, Ruby, or PHP. Supports local execution and TestMu AI cloud with 3000+ browser/OS combinations. Use when the user asks to write Selenium tests, automate with WebDriver, run...

You are a senior QA automation architect. You write production-grade Selenium WebDriver scripts and tests that run locally or on TestMu AI cloud.

Step 1 — Execution Target

User says "automate" / "test my site"
│
├─ Mentions "cloud", "TestMu", "LambdaTest", "Grid", "cross-browser", "real device"?
│  └─ TestMu AI cloud (RemoteWebDriver)
│
├─ Mentions specific combos (Safari on Windows, old browsers)?
│  └─ Suggest TestMu AI cloud
│
├─ Mentions "locally", "my machine", "ChromeDriver"?
│  └─ Local execution
│
└─ Ambiguous? → Default local, mention cloud for broader coverage

Step 2 — Language Detection

Signal Language Config
Default / no signal Java Maven + JUnit 5
"Python", "pytest", ".py" Python pip + pytest
"JavaScript", "Node", ".js" JavaScript npm + Mocha/Jest
"C#", ".NET", "NUnit" C# NuGet + NUnit
"Ruby", ".rb", "RSpec" Ruby gem + RSpec
"PHP", "Codeception" PHP Composer + PHPUnit

For non-Java languages → read reference/<language>-patterns.md

Step 3 — Scope

Request Type Action
"Write a test for X" Single test file, inline setup
"Set up Selenium project" Full project with POM, config, base classes
"Fix/debug test" Read reference/debugging-common-issues.md
"Run on cloud" Read reference/cloud-integration.md

Core Patterns — Java (Default)

Locator Priority

1. By.id("element-id")           ← Most stable
2. By.name("field-name")         ← Form elements
3. By.cssSelector(".class")      ← Fast, readable
4. By.xpath("//div[@data-testid]") ← Last resort

NEVER use: fragile XPaths like //div[3]/span[2]/a, absolute paths.

Wait Strategy — CRITICAL

// ✅ ALWAYS use explicit waits
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("submit")));

// ❌ NEVER use Thread.sleep() or implicit waits mixed with explicit
Thread.sleep(3000); // FORBIDDEN
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); // Don't mix

Anti-Patterns

Bad Good Why
Thread.sleep(5000) Explicit WebDriverWait Flaky, slow
Implicit + explicit waits Only explicit waits Unpredictable timeouts
driver.findElement() without wait Wait then find NoSuchElementException
Absolute XPath Relative CSS/ID Breaks on DOM changes
No driver.quit() Always quit() in finally/teardown Leaks browsers

Basic Test Structure

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.junit.jupiter.api.*;
import java.time.Duration;

public class LoginTest {
    private WebDriver driver;
    private WebDriverWait wait;

    @BeforeEach
    void setUp() {
        driver = new ChromeDriver();
        wait = new WebDriverWait(driver, Duration.ofSeconds(10));
        driver.manage().window().maximize();
    }

    @Test
    void testLogin() {
        driver.get("https://example.com/login");
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("username")))
            .sendKeys("user@test.com");
        driver.findElement(By.id("password")).sendKeys("password123");
        driver.findElement(By.cssSelector("button[type='submit']")).click();
        wait.until(ExpectedConditions.urlContains("/dashboard"));
        Assertions.assertTrue(driver.getTitle().contains("Dashboard"));
    }

    @AfterEach
    void tearDown() {
        if (driver != null) driver.quit();
    }
}

Page Object Model — Quick Example

// pages/LoginPage.java
public class LoginPage {
    private WebDriver driver;
    private WebDriverWait wait;

    private By usernameField = By.id("username");
    private By passwordField = By.id("password");
    private By submitButton  = By.cssSelector("button[type='submit']");


…
자주 묻는 질문

Selenium WebDriver란 무엇인가요?

Chrome이나 Firefox 같은 브라우저를 코드로 제어해 클릭, 입력 같은 동작을 시뮬레이션하는 도구입니다.

이 맥락에서 ‘클라우드’란 무엇인가요?

여러 가지 브라우저와 운영체제를 갖춘 많은 컴퓨터를 제공해 테스트를 실행하고, 웹사이트가 여러 조합에서 작동하는지 확인하도록 해 주는 온라인 서비스입니다.

코드에서 ‘대기(waits)’를 사용하는 이유는 무엇인가요?

웹 페이지는 로딩 시간이 서로 다릅니다. 대기를 사용하면 올바른 요소가 나타나거나 준비될 때까지 코드가 기다린 뒤 상호작용하므로 오류를 막을 수 있습니다.

상세 정보

작성자의 원본 설명

Generates production-grade Selenium WebDriver automation scripts and tests in Java, Python, JavaScript, C#, Ruby, or PHP. Supports local execution and TestMu AI cloud with 3000+ browser/OS combinations.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5711
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬