New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

playwright-components

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playwright-components

Set of page object components to help in complex playwright projects

Source
npmnpm
Version
0.5.13
Version published
Weekly downloads
391
-35.26%
Maintainers
1
Weekly downloads
 
Created
Source

playwright-components

Set of page object components to help in complex playwright projects

Usage

import { Locator, Page } from "@playwright/test";
import { TableComponent } from "playwright-components";

export class MyPage {
  readonly page: Page;
  readonly myButton: Locator;
  readonly myTable: TableComponent;

  constructor(page: Page) {
    this.page = page;
    this.myButton = page.getByRole("button", { name: "My Button" });
    this.table = new TableComponent(page.getByRole("table"));
  }

  async goto() {
    await this.page.goto("/my-page");
  }

  async isFileVisible(fileName: string): Promise<boolean> {
    return !!(await this.table.getBodyRowsAsMaps()).find(
      (row) => row.get("fileName") === fileName,
    );
  }
}

Keywords

playwright

FAQs

Package last updated on 24 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts