技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
quality-engineering-selector-stability【数据与研究】Cross-stack selector and test-id policy for web and mobile automation. Use when writing or reviewing E2E/UI test locators, or adding data-testid/accessibility identifiers to components.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
getByRole / getByLabel > getByTestId (data-testid) > attribute CSS. Never XPath, nth-child, or generated class names.
Accessibility id > resource-id / testTag > predicate/uiautomator > XPath. Never XPath.
data-testid. React Native: testID + accessibilityLabel.Semantics(identifier:) for black-box E2E; WidgetKeys stay for widget tests..accessibilityIdentifier. Compose: Modifier.testTag + testTagsAsResourceId = true.<screen>-<element>-<role>, kebab-case (e.g. checkout-submit-button).
Add ids to leaf interactive/assertable elements only, never layout wrappers. Never rename an existing id — ids are a public contract other tests depend on.
rename (id changed), restructure (DOM/tree moved), i18n (visible text changed, id untouched).
nth), generated/hashed class names.accessibilityLabel as a test id (it is user-facing a11y text, not a stable identifier).