Token导航 LogoToken导航

Agent Skill · 研究检索

cross-browser-testing(跨浏览器测试)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

cross-browser-testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 61,604。

总安装 349周安装 14GitHub Stars 4下载 113核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cross-browser-testing(跨浏览器测试)
来源仓库:https://github.com/petrkindlmann/qa-skills
仓库路径:skills/cross-browser-testing
安装命令:
npx skills add https://github.com/petrkindlmann/qa-skills --skill cross-browser-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/petrkindlmann/qa-skills --skill cross-browser-testing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

cross-browser-testing 根据真实用户浏览器分布设计端到端测试矩阵。整合 BrowserStack/Sauce Labs 等平台资源进行云真机验证。区分桌面与移动端渲染差异,避免无效测试覆盖。依赖项目根目录下的 qa-project-context.md 获取优先级配置。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cross-browser-testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/petrkindlmann/qa-skills --skill cross-browser-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cross-browser-testing 怎么安装?

在终端执行 npx skills add https://github.com/petrkindlmann/qa-skills --skill cross-browser-testing。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cross-browser-testing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cross-browser-testing 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

cross-browser-testing 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cross-browser-testing 用的人多吗?

公开数据是累计安装 349 次,近一周安装 14 次,下载 113 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cross-browser-testing 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
cross-browser-testing

跨浏览器测试 · 本页

3494操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Before starting: Check for .agents/qa-project-context.md in the project root. It contains target browsers, analytics data, and platform priorities that drive matrix design.


Discovery Questions

  1. Target browsers from analytics: What do actual users use? Pull browser/OS data from your analytics tool. Testing browsers nobody uses is waste; missing a browser 15% of users rely on is a bug.
  2. Desktop and mobile? Mobile Safari on iOS and Chrome on Android have different rendering behaviors than their desktop counterparts. Treat them as separate matrix entries.
  3. Cloud platform: BrowserStack, Sauce Labs, LambdaTest, or local browsers only? Cloud platforms provide real browser instances; Playwright's built-in browsers cover Chromium, Firefox, and WebKit.
  4. Progressive enhancement or pixel-perfect? Progressive enhancement accepts graceful degradation. Pixel-perfect demands identical rendering. The answer determines pass/fail criteria.
  5. Existing Playwright config? If the project already uses Playwright, cross-browser testing is a configuration change, not a new tool.

Core Principles

  1. Analytics-driven matrix. Test what your users actually use. A browser at 0.3% traffic does not need the same investment as one at 40%. Check analytics quarterly -- browser share shifts.
  2. Progressive enhancement over pixel-perfect. Identical rendering across all browsers is neither achievable nor necessary. Define what "works" means: core functionality operates, content is accessible, layout is usable. Visual differences in shadows, gradients, or animation timing are acceptable.
  3. Safari and Firefox surface the most cross-browser bugs. Chrome-only testing catches Chrome bugs. Safari's WebKit engine and Firefox's Gecko engine have the most behavioral differences from Chromium. Prioritize them.
  4. Test functionality, not rendering engine internals. A cross-browser test should verify that the user can complete a task, not that a CSS property renders identically. Visual comparison tools handle pixel-level differences.
  5. One test, multiple browsers. Write tests once. Run them across browser configurations. Never duplicate test logic for different browsers.

Browser Matrix Design

Analytics-Based Methodology

Step 1: Export browser/OS data from analytics (last 90 days)
Step 2: Rank by session share
Step 3: Group into tiers
Step 4: Assign test coverage per tier
Step 5: Review quarterly

Tier System

TierCriteriaCoverageWhen to run
P0>10% traffic shareFull test suiteEvery PR, every deploy
P13-10% traffic shareSmoke + critical pathsNightly, pre-release
P21-3% traffic shareSmoke tests onlyWeekly, pre-release
Skip<1% traffic shareNot testedManual spot-check if reported

Example Matrix (derived from analytics)

## Browser Matrix — Q1 2026

| Browser | Version | Platform | Traffic % | Tier | Notes |
|---------|---------|----------|-----------|------|-------|
| Chrome | Latest | Windows | 34% | P0 | |
| Chrome | Latest | macOS | 12% | P0 | |
| Safari | Latest | macOS | 11% | P0 | WebKit-specific issues |
| Chrome | Latest | Android | 15% | P0 | Mobile viewport |
| Safari | Latest | iOS | 14% | P0 | Mobile Safari quirks |
| Firefox | Latest | Windows | 5% | P1 | Gecko rendering |
| Edge | Latest | Windows | 4% | P1 | Chromium-based but different UA |
| Samsung Internet | Latest | Android | 3% | P1 | Chromium fork, older engine |
| Firefox | Latest | macOS | 1.5% | P2 | |
| Chrome | N-1 | Windows | 1.2% | P2 | Previous major version |

Version Coverage Strategy

  • Latest: Always test current stable release.
  • Latest - 1: Test previous major version only for P0 browsers where analytics show >1% on older versions.
  • Extended Support Release (ESR): Test Firefox ESR only if enterprise users are a significant segment.
  • Do not test: Beta/Canary/Nightly releases unless you are a browser vendor or building browser-facing tools.

Playwright Browser Configuration

Built-in Browsers

Playwright ships three browser engines. No cloud platform needed for basic cross-browser coverage.

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  projects: [
    // P0: Desktop
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'webkit', use: { ...devices['Desktop Safari'] } },

    // P0: Mobile
    { name: 'mobile-chrome', use: { ...devices['Pixel 7'] } },
    { name: 'mobile-safari', use: { ...devices['iPhone 15'] } },

    // P1: Desktop
    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
    { name: 'edge', use: { channel: 'msedge' } },

    // P2: Tablets
    { name: 'ipad', use: { ...devices['iPad Pro 11'] } },
  ],
});

Browser Channels

Playwright can drive locally installed branded browsers instead of its bundled engines.

// Use installed Chrome instead of bundled Chromium
{ name: 'chrome', use: { channel: 'chrome' } },

// Use installed Edge
{ name: 'edge', use: { channel: 'msedge' } },

// WebKit is always Playwright's bundled version (no channel option)
// Firefox is always Playwright's bundled version

When to use channels: When you need to test browser-specific behavior that differs between Chromium and Chrome (extensions support, enterprise policies, codec support).

Running Specific Projects

# Run only Safari tests
npx playwright test --project=webkit

# Run only mobile tests
npx playwright test --project=mobile-chrome --project=mobile-safari

# Run P0 browsers in CI, all browsers nightly
npx playwright test --project=chromium --project=webkit --project=mobile-chrome --project=mobile-safari

Cloud Platform Setup

BrowserStack

// browserstack.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  use: {
    connectOptions: {
      wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
        browser: 'chrome',
        browser_version: 'latest',
        os: 'Windows',
        os_version: '11',
        'browserstack.username': process.env.BROWSERSTACK_USERNAME,
        'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
        'browserstack.playwrightVersion': '1.49.0',
        build: `cross-browser-${process.env.CI_BUILD_NUMBER}`,
        name: 'Cross-browser test suite',
      }))}`,
    },
  },
});

Sauce Labs

// sauce.config.ts
export default defineConfig({
  use: {
    connectOptions: {
      wsEndpoint: `wss://ondemand.saucelabs.com/playwright?sauce:options=${encodeURIComponent(JSON.stringify({
        username: process.env.SAUCE_USERNAME,
        accessKey: process.env.SAUCE_ACCESS_KEY,
        browserName: 'chromium',
        browserVersion: 'latest',
        platformName: 'Windows 11',
        'sauce:build': `build-${process.env.CI_BUILD_NUMBER}`,
      }))}`,
    },
  },
});

CI Matrix with Cloud Platforms

# GitHub Actions: parallel cross-browser on BrowserStack
cross-browser:
  runs-on: ubuntu-latest
  strategy:
    fail-fast: false
    matrix:
      include:
        - browser: chrome
          os: Windows
          os_version: "11"
        - browser: safari
          os: OS X
          os_version: Sonoma
        - browser: firefox
          os: Windows
          os_version: "11"
        - browser: edge
          os: Windows
          os_version: "11"
  steps:
    - uses: actions/checkout@v4
    - run: npm ci
    - run: npx playwright test
      env:
        BROWSER: ${{ matrix.browser }}
        BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
        BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

Common Cross-Browser Issues

Real issues that surface in cross-browser testing, with detection patterns and fixes.

CSS Grid and Flexbox

/* Issue: Safari does not support gap on flexbox in older versions */
.flex-container {
  display: flex;
  gap: 16px; /* Safari < 14.1 ignores this */
}

/* Fix: use margin fallback */
.flex-container > * + * {
  margin-left: 16px;
}
@supports (gap: 16px) {
  .flex-container > * + * {
    margin-left: 0;
  }
}
// Test: verify layout spacing is correct across browsers
test('product grid has consistent spacing', async ({ page }) => {
  await page.goto('/products');
  const cards = page.getByTestId('product-card');
  await expect(cards).toHaveCount(6);

  // Verify cards are laid out in a grid (not stacked vertically)
  const firstBox = await cards.nth(0).boundingBox();
  const secondBox = await cards.nth(1).boundingBox();
  expect(firstBox).not.toBeNull();
  expect(secondBox).not.toBeNull();
  // Cards should be side by side, not stacked
  expect(secondBox!.x).toBeGreaterThan(firstBox!.x);
});

Scroll Behavior

/* Issue: scroll-behavior: smooth is inconsistent across browsers */
html {
  scroll-behavior: smooth; /* Firefox/Chrome: works. Safari: partial. */
}
// Test: verify anchor navigation works (regardless of smooth scroll support)
test('clicking anchor scrolls to section', async ({ page }) => {
  await page.goto('/docs');
  await page.getByRole('link', { name: 'Installation' }).click();
  // Check that the section is visible, not the scroll animation
  await expect(page.getByRole('heading', { name: 'Installation' })).toBeInViewport();
});

Date Input

// Issue: <input type="date"> renders differently across browsers
// Firefox: native date picker. Safari: text input (older versions). Chrome: native picker.
test('date picker accepts valid date', async ({ page, browserName }) => {
  await page.goto('/booking');
  const dateInput = page.getByLabel('Check-in date');

  if (browserName === 'webkit') {
    // Safari may render as text input -- type the date
    await dateInput.fill('2026-06-15');
  } else {
    await dateInput.fill('2026-06-15');
  }

  await page.getByRole('button', { name: 'Search' }).click();
  await expect(page.getByText('June 15, 2026')).toBeVisible();
});

Clipboard API

// Issue: navigator.clipboard requires focus and permissions; behavior differs by browser
test('copy button copies text to clipboard', async ({ page, context, browserName }) => {
  // Grant clipboard permission (Chromium only -- Firefox/WebKit handle differently)
  if (browserName === 'chromium') {
    await context.grantPermissions(['clipboard-read', 'clipboard-write']);
  }

  await page.goto('/share');
  await page.getByRole('button', { name: 'Copy link' }).click();

  // Verify via UI feedback rather than clipboard API (more reliable cross-browser)
  await expect(page.getByText('Copied!')).toBeVisible();
});

Backdrop Filter

/* Issue: backdrop-filter not supported in older Firefox */
.modal-overlay {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari */
  background-color: rgba(0, 0, 0, 0.5); /* Fallback */
}

Dialog Element

// Issue: <dialog> element behavior varies. Safari had bugs with ::backdrop and form[method=dialog].
test('modal dialog opens and closes', async ({ page }) => {
  await page.goto('/settings');
  await page.getByRole('button', { name: 'Delete account' }).click();

  const dialog = page.getByRole('dialog', { name: 'Confirm deletion' });
  await expect(dialog).toBeVisible();

  await page.getByRole('button', { name: 'Cancel' }).click();
  await expect(dialog).not.toBeVisible();
});

Web Animations API

// Issue: animation timing and composite modes differ across engines
test('loading spinner is visible during fetch', async ({ page }) => {
  // Slow down the API response to catch the loading state
  await page.route('**/api/data', async (route) => {
    await new Promise((resolve) => setTimeout(resolve, 500));
    await route.fulfill({ json: { items: [] } });
  });

  await page.goto('/dashboard');
  await expect(page.getByRole('progressbar')).toBeVisible();
  await expect(page.getByRole('progressbar')).not.toBeVisible({ timeout: 5000 });
});

Testing Patterns

Same Test, Multiple Browsers

The default pattern. Write once, configure projects.

// This test runs on every configured browser project automatically
test('user can complete checkout', async ({ page }) => {
  await page.goto('/cart');
  await page.getByRole('button', { name: 'Checkout' }).click();
  await page.getByLabel('Card number').fill('4242424242424242');
  await page.getByLabel('Expiry').fill('12/28');
  await page.getByLabel('CVC').fill('123');
  await page.getByRole('button', { name: 'Pay' }).click();
  await expect(page.getByRole('heading', { name: 'Order confirmed' })).toBeVisible();
});

Browser-Specific Test Logic

When browser behavior genuinely differs, use browserName to branch.

test('file upload works', async ({ page, browserName }) => {
  await page.goto('/upload');
  const fileInput = page.locator('input[type="file"]');

  // WebKit does not support directory upload
  if (browserName === 'webkit') {
    await fileInput.setInputFiles('/path/to/file.pdf');
  } else {
    await fileInput.setInputFiles(['/path/to/file1.pdf', '/path/to/file2.pdf']);
  }

  await expect(page.getByText('Upload complete')).toBeVisible();
});

Rule: Browser-specific logic in tests should be rare. If you have many browser branches, the application likely has compatibility bugs to fix.

Visual Cross-Browser Comparison

Use Playwright's screenshot comparison to catch rendering differences.

test('homepage renders correctly', async ({ page }) => {
  await page.goto('/');
  await expect(page).toHaveScreenshot('homepage.png', {
    maxDiffPixelRatio: 0.01, // Allow 1% pixel difference
  });
  // Each browser project generates its own baseline:
  // homepage-chromium.png, homepage-webkit.png, homepage-firefox.png
});

Progressive Enhancement Validation

test('form works without JavaScript', async ({ page, browserName }) => {
  // Disable JavaScript to test progressive enhancement
  // Note: only works with Chromium
  if (browserName === 'chromium') {
    await page.context().route('**/*', (route) => {
      if (route.request().resourceType() === 'script') {
        return route.abort();
      }
      return route.continue();
    });
  }

  await page.goto('/contact');
  // Core form submission should work via native HTML form action
  await page.getByLabel('Message').fill('Hello');
  await page.getByRole('button', { name: 'Send' }).click();
  // Even without JS, the form should submit and show confirmation
  await expect(page).toHaveURL(/.*thank-you/);
});

Anti-Patterns

Testing only on Chrome. Chrome is ~65% of desktop traffic but uses the same engine as Edge, Opera, and Brave. Safari (WebKit) and Firefox (Gecko) surface the real cross-browser issues. Chrome-only testing gives false confidence.

Testing every browser equally. A browser at 1% traffic share does not need the same test investment as one at 30%. Use the tier system to allocate effort proportionally.

Duplicating tests per browser. Write tests once, run them across browser projects via configuration. If you have a checkout.chrome.spec.ts and a checkout.safari.spec.ts with the same test logic, you are doing it wrong.

Using browserName checks everywhere. Excessive browser branching in tests signals application compatibility issues. Fix the app, do not work around it in tests.

Pixel-perfect assertions without tolerance. Font rendering, anti-aliasing, and sub-pixel rounding differ between browsers and platforms. Use maxDiffPixelRatio or maxDiffPixels in visual comparisons.

Ignoring mobile browsers. Mobile Chrome and mobile Safari are not the same as their desktop counterparts. They have different viewport behaviors, touch event handling, and CSS support. Test them as separate matrix entries.

Static browser matrix. Browser usage changes. If your matrix is based on data from 2 years ago, it is wrong. Review analytics data quarterly.


Done When

  • Browser matrix defined using real analytics data (last 90 days), with tier assignments (P0/P1/P2) documented and justified by traffic share.
  • Playwright project config (or BrowserStack/Sauce Labs config) reflects the defined matrix and runs P0 browsers on every PR.
  • Known browser-specific bugs documented with the affected browser, reproduction steps, and either a workaround or a linked open ticket.
  • Rendering issues checklist (flexbox gaps, scroll behavior, date inputs, clipboard API, dialog element) run against all P0 and P1 target browsers.
  • Browser matrix reviewed and signed off by the team, with a calendar reminder set for quarterly refresh against updated analytics data.

Related Skills

  • visual-testing -- Screenshot comparison, baseline management, and threshold strategies for pixel-level cross-browser validation.
  • playwright-automation -- Core Playwright patterns, fixtures, and CI configuration that cross-browser testing builds on.
  • ci-cd-integration -- Pipeline configuration for parallel browser matrix execution, artifact collection.
  • accessibility-testing -- Cross-browser accessibility differences (screen reader behavior, ARIA support) overlap with cross-browser testing.
  • mobile-testing -- Device-specific testing for native/hybrid apps extends the browser matrix to app-level concerns.

平台分布

Codex

35.56%
按下载量换算40

Claude

30.23%
按下载量换算34

Cursor

20.22%
按下载量换算23

Gemini CLI

10.13%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills