Skip to content

Page Load Strategy Configuration and ChromeWSUrl Handling #1520

@coderabbitai

Description

@coderabbitai

This issue tracks the implementation of configurable page load strategies and improved Chrome WebSocket URL handling for Katana.

Related PR: #1514
Requested by: @Mzack9999

Overview

The PR adds new CLI flags to configure page load strategies:

  • --page-load-strategy / -pls: Options include heuristic (default), domcontentloaded, networkidle, load, none
  • --dom-wait-time / -dwt: Configurable wait time for domcontentloaded strategy (default 5s)

Key Changes

  • Pure headless ChromeWSUrl support: runner now selects headless.New() when -cwu is set
  • Multiple page load strategies to address timeout failures on modern SPAs with continuous network activity
  • Browser persistence for reusable sessions when using external Chrome via WebSocket URL
  • Backward compatibility maintained with heuristic as default strategy

Benefits

  • Resolves SPA timeouts by avoiding indefinite waits for network idle
  • Enables full headless features with -cwu flag
  • Performance improvements for complex SPAs
  • Tested with React SPA: increased endpoint discovery from ~125 to 3000+ URLs

Comment reference: #1514 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions