selenium-skill
यह क्या करती है
यह टूल वेबसाइट के लिए अपने-आप चलने वाला टेस्ट कोड बनाता है। यह यूज़र के एक्शन की नकल करके जांचता है कि वेबसाइट सही तरह से काम कर रही है या नहीं।
कब इस्तेमाल करें
- ✓जब आप जांचना चाहते हैं कि वेबसाइट कई ब्राउज़र में ठीक चलती है या नहीं।
- ✓जब आपको वेबसाइट की क्वालिटी पक्की करने के लिए ऑटोमेटेड टेस्ट बनाने हों।
- ✓जब आप गलतियां ढूंढने के लिए वेबसाइट के इस्तेमाल की नकल करना चाहते हैं।
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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“वेबसाइट X पर लॉगिन जांचने के लिए Java में एक ऑटोमेटेड टेस्ट बनाओ।”
हर हफ़्ते 5 नई skills, 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) को कंट्रोल किया जा सकता है, जिसमें क्लिक करना, टाइप करना और दूसरे काम शामिल हैं।
इस संदर्भ में 'cloud' का क्या मतलब है?
यह एक ऑनलाइन सेवा है जो कई कंप्यूटर देती है, जिनमें अलग-अलग ब्राउज़र और ऑपरेटिंग सिस्टम होते हैं। इन पर आपके टेस्ट चलते हैं, ताकि पक्का हो कि वेबसाइट हर तरह के मेल में ठीक चलती है।
कोड में 'waits' का इस्तेमाल क्यों होता है?
वेब पेज अलग-अलग समय पर लोड होते हैं। '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.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5711
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।