Skip to content

Implement a status Command #247

@codeCraft-Ritik

Description

@codeCraft-Ritik

Issue :

There is currently no quick way to see the "state" of the current browser session (URL, title, number of open tabs) without running a full snapshot or tab-list. Improvement: Add a status command that provides a high-level overview of the current session.

File Path : playwright-cli/README.md (to document) and the command registration logic.

Proposed Logic : Create a new command that returns the current URL, page title, and viewport size.

Implementation :

// Command: status
const status = {
  url: page.url(),
  title: await page.title(),
  tabs: (await page.context().pages()).length,
  viewport: page.viewportSize()
};
console.table(status);

Metadata

Metadata

Assignees

No one assigned

    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