browser-config

Centralize pytest and Playwright browser configuration with layered fixtures.

176|2|Updated May 21, 2026
One-click install
npx skills add https://github.com/DanielSuo117/velocitai --skill browser-config-danielsuo117
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: browser-config
Source: https://github.com/DanielSuo117/velocitai/tree/main/zh/skills/browser-config
Command: npx skills add https://github.com/DanielSuo117/velocitai --skill browser-config-danielsuo117

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes all browser configuration (viewport, headless, timeouts) in a single place, injected via fixtures, avoiding hard-coded values in tests and PageObjects.

Core Features & Use Cases

  • Layered fixture architecture with session, function, and class scopes.
  • Central constants for HEADLESS, SLOW_MO, DEFAULT_TIMEOUT, DEFAULT_NAVIGATION_TIMEOUT, VIEWPORT_WIDTH, VIEWPORT_HEIGHT.
  • Guidance on separating viewport and timeouts and using incognito mode for isolated runs.

Quick Start

Configure your tests by adjusting the constants in this skill's browser-config module and re-run pytest to apply the new settings.

Frequently Asked Questions about browser-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize browser configuration for Playwright tests in pytest?

Centralize browser configuration by defining constants for viewport, headless mode, and timeouts in a single module, then injecting them via pytest fixtures. This eliminates hard-coded values across tests and PageObjects.

Why do my Playwright tests have inconsistent viewport and timeout settings?

Inconsistent viewport and timeout settings occur when values are hard-coded in individual tests. Centralizing configuration into shared fixtures for session, function, and class scopes ensures consistent test behavior across pages.

Can I configure separate default timeout and navigation timeout for Playwright tests?

Yes, you can configure separate timeouts by defining DEFAULT_TIMEOUT and DEFAULT_NAVIGATION_TIMEOUT constants. These centralized values are applied across tests to control action and navigation wait times distinctly.

Does this centralized browser configuration support incognito mode for isolated test runs?

Yes, the centralized browser configuration supports incognito mode. It provides guidance on using incognito mode to ensure isolated test runs, preventing state leakage between test sessions and classes.

How do I set up pytest fixtures for layered Playwright browser settings?

Set up layered fixtures by defining constants for viewport, timeouts, and headless mode, then applying them across session, function, and class scopes. Adjust the constants in the browser-config module and re-run pytest.

What is the best way to manage headless and viewport settings across a pytest Playwright suite?

The best way to manage headless and viewport settings is to centralize them as constants like HEADLESS and VIEWPORT_WIDTH. Injecting these constants through fixtures prevents hard-coded values and ensures consistent behavior.