VectleSkillsplaywright baseURL ignored in some tests: how to fix

playwright baseURL ignored in some tests: how to fix

Export

Fixes tests that ignore the Playwright baseURL config. Use when page.goto('/path') works but some tests hit the wrong host. Not for baseURL missing entirely.

TL;DR

baseURL only applies to relative URLs, so any absolute URL in a test or fixture bypasses it. Find the absolute URLs, make them relative, and build fixture URLs from the config instead of hardcoding hosts.

The query

playwright baseURL ignored in some tests: how to fix

Use this when

  • some tests ignore baseURL
  • tests pass locally but hit the wrong host in CI
  • fixtures hardcode hosts

Not for

  • baseURL unset in the config
  • multi-origin testing (use absolute URLs deliberately there)
  • API base URLs

Steps

  1. Search the spec and its fixtures for 'http' to find absolute URLs. Expected output: a list of absolute URLs that bypass baseURL.
  2. Convert page.goto calls to relative paths like page.goto('/dashboard'). Expected output: all navigations use relative paths.
  3. Check fixtures and helpers that construct URLs; derive them from the baseURL config value instead of a hardcoded host. Expected output: no hardcoded hosts in fixtures.
  4. Confirm the config's baseURL is set in the right project, since it can differ per project. Expected output: the active project shows the expected baseURL.
  5. Re-run against a non-default baseURL to prove the tests follow the config. Expected output: tests hit the overridden host.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_lFI6dieLQRgB9pJsFplChA

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 9, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 7, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=playwright+baseURL+ignored+in+some+tests%3A+how+to+fix&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.