Gathering detailed insights and metrics for playwright-controller
Gathering detailed insights and metrics for playwright-controller
npm install playwright-controller
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (85.2%)
HTML (14.34%)
JavaScript (0.44%)
Dockerfile (0.02%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,856
Last Day
1
Last Week
1
Last Month
5
Last Year
197
MIT License
174 Stars
1,214 Commits
12 Forks
8 Watchers
1 Branches
6 Contributors
Updated on Dec 22, 2024
Minified
Minified + Gzipped
Latest Version
0.10.0
Package Id
playwright-controller@0.10.0
Unpacked Size
167.28 kB
Size
32.00 kB
File Count
264
NPM Version
6.10.3
Node Version
12.10.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
1
Compared to previous week
Last Month
-83.9%
5
Compared to previous month
Last Year
-10.5%
197
Compared to previous year
Fluent API around Playwright
npm i --save playwright-controller
This will also install Playwright along with its dependencies and the browser binaries. Browser binaries are about 50-100MB each, so expect the installation network traffic to be substantial.
1import { PlaywrightController } from 'playwright-controller'; 2 3const pwc = new PlaywrightController(); 4 5await pwc 6 .withBrowser('chromium') 7 .withOptions({ 8 headless: false, 9 }) 10 .emulateDevice('iPhone 6 landscape') 11 .withCursor() 12 .navigateTo('https://reactstrap.github.io/components/form/') 13 .click('#exampleEmail') 14 .typeText('foo.bar@baz.com') 15 .pressKey('Tab'); 16 .expectThat('#examplePassword').hasFocus() 17 .typeText("don't tell!") 18 .pressKey('Tab'); 19 .expectThat(passwordInputSelector).hasClass('is-valid') 20 .hover('#exampleCustomSelect') 21 .select('Value 3').in('#exampleCustomSelect') 22 .close();
This API provides a Selector Fluent API that enables to find and target a DOM element or a collection of DOM elements that is embedded in complex DOM Hierarchy:
1const selector = pwc 2 .selector('[role="row"]') // will get all dom elements, within the current page, with the attribute role="row" 3 .withText('foobar') // will filter only those that contain the text 'foobar' 4 .find('td') // from previous result(s), find all embedded <td> elements 5 .nth(2); // take only the second cell 6 7await pwc.expectThat(selector).hasText('foobar-2');
This API is still a draft and is in early development, but stay tuned!
Check out our contributing guide.
Playwright-controller is just a wrapper around the Playwright API. The purpose of Playwright-controller is to be able to write e2e tests as fast as possible in a way that makes tests readable, reusable and maintainable.
Yes you can.
1import { PlaywrightController } from 'playwright-controller'; 2 3// just create a new instance with playwright's browser and page instances 4const pwc = new PlaywrightController(browser, page); 5 6// now you can use the fluent API
Yes you can. To use the Playwright API, just use the currentBrowser()
and/or currentPage()
methods exposed by the fluent API:
1const browser = 'chromium';
2const pwc = new PlaywrightController();
3await pwc
4 .withBrowser(browser)
5 .emulateDevice('iPhone 6 landscape')
6 .withCursor()
7 .navigateTo('https://reactstrap.github.io/components/form/')
8 ...;
9
10// now if you want to use the playwright API from this point:
11const browser = pwc.currentBrowser();
12const page = pwc.currentPage();
13
14// the browser and page objects are standard playwright objects
15// so now you are ready to go by using the playwright API
The documentations:
reflect the current status of the development and are inline with the published package.
Yes, have a look to this starter project.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
6 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More