smartlocatoragent
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "smartlocatoragent" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4e59de043b32a2e05957aed9294e7b70c2c5c36d4396e75a3a44f729ec6b5877. Verify the upstream source and version against https://github.com/anhtester/antigravity-testing-kit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Generate stable, maintainable UI automation locators supporting Playwright, Selenium, and Appium.
Introduction source: third_party · anhtester · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Skill sinh locator ổn định và dễ bảo trì cho UI automation, hỗ trợ Playwright, Selenium và Appium.
- Audience
- Use this skill when: Generating locators for new UI elements Reviewing existing locators for stability Migrating locators between frameworks
- Inputs and outputs
- When generating locators, provide: 1. **Primary locator** — The best, most stable option 2. **Fallback locator** — Alternative if primary breaks 3. **Reasoning** — Why this locator was chosen
- Testing
- Not tested
Browse files
Frontmatter
name: Smart Locator Agent
description: Skill sinh locator ổn định và dễ bảo trì cho UI automation, hỗ trợ Playwright, Selenium và Appium.Smart Locator Agent
Purpose: Generate stable and maintainable locators for UI automation.
Applicable frameworks:
- Playwright
- Selenium
- Appium
When to Use
Use this skill when:
- Generating locators for new UI elements
- Reviewing existing locators for stability
- Migrating locators between frameworks
Responsibilities
The agent must:
- Inspect the DOM or mobile UI hierarchy (NEVER guess)
- Identify stable attributes
- Generate a reliable locator
- Validate locator uniqueness
- Provide fallback locator if primary is fragile
Locator Priority
Use the following priority order:
- Accessibility attributes (aria-label, role)
data-testid/data-test/data-qaidname- Framework semantic locator
css selectorxpath(last option)
Note: For detailed rules, refer to
.agent/rules/locator_strategy.md.
Playwright Locators
Preferred locator methods:
getByRole()— Best for semantic elementsgetByLabel()— Best for form fields with labelsgetByPlaceholder()— Best for inputs with placeholder textgetByText()— Best for text contentgetByTestId()— Best when data-testid is available
Example:
page.getByRole("button", { name: "Submit" })
page.getByLabel("Email")
page.getByPlaceholder("Enter your password")
Note: For detailed rules, refer to
.agent/rules/playwright_rules.md.
Selenium Locators
Preferred order:
iddata-testidnamecssSelectorxpath
Example:
driver.findElement(By.id("login-button"));
driver.findElement(By.cssSelector("button[data-testid='submit-btn']"));
Note: For detailed rules, refer to
.agent/rules/selenium_rules.md.
Appium Locators
Preferred order:
accessibility idresource-ididiOS predicate stringclass chainxpath
Example:
driver.findElement(AppiumBy.accessibilityId("login_button"));
driver.findElement(AppiumBy.id("com.app:id/login_button"));
driver.findElement(AppiumBy.iOSNsPredicateString("label == 'Login'"));
Note: For detailed rules, refer to
.agent/rules/appium_rules.md.
Validation Rules
Before using a locator, ensure:
- [ ] It matches exactly one element
- [ ] The element is visible and interactable
- [ ] It is stable across page reloads
- [ ] It survives cosmetic DOM changes (layout, styling)
- [ ] It does NOT use dynamic class names or positional xpath
Output Format
When generating locators, provide:
- Primary locator — The best, most stable option
- Fallback locator — Alternative if primary breaks
- Reasoning — Why this locator was chosen
Rules References
.agent/rules/locator_strategy.md— Master locator priority map.agent/rules/playwright_rules.md— Playwright-specific locator rules.agent/rules/selenium_rules.md— Selenium-specific locator rules.agent/rules/appium_rules.md— Appium-specific locator rules
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 直接解决UI自动化测试中的核心痛点,显著提升测试脚本的稳定性和维护性
- 适用于广泛受众,支持Playwright、Selenium和Appium三大主流框架
Areas to improve
-
description语言不一致 Reported severity: Minor
顶层description使用越南语,而skill_body使用英语,可能导致非越南语用户理解困难
Recommendation: 建议统一使用英语或提供多语言支持
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
- 提供了明确的使用场景和框架支持说明
Areas to improve
-
文档过长 Reported severity: Minor
文档内容较为详细,可能影响用户快速获取关键信息
Recommendation: 建议将详细规则移至外部文档,保持主文档简洁
-
引用文件缺失 Reported severity: Minor
文档中引用了多个外部规则文件(.agent/rules/*.md),但未确认这些文件是否存在
Recommendation: 确保所有引用的外部文件都存在且内容完整
Highlights
- Phase/步骤清晰,有出口条件,含端到端示例
- frontmatter完整,结构良好
Highlights
- 工具来源明确,参数正确,覆盖主要异常
- 提供了详细的验证规则和输出格式,确保执行可靠性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.