[BUG] No Playwright class typed definition anymore in @next
See original GitHub issueContext:
- Playwright Version: 0.11.1-next.1584947279674 (March 23, 2020)
- Operating System: Linux
Code Snippet
import { Playwright } from 'playwright-core/lib/server/playwright'
const pw = new Playwright({
browsers: ['webkit', 'chromium', 'firefox'],
});
Describe the bug
In version 0.11.1 and some of the recent next releases it was working. Now the types are missing.
Version 0.11.1 example: https://unpkg.com/playwright-core@0.11.1/lib/server/playwright.d.ts
I think it’s related to #1166.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to wait for JavaScript to finish in playwright - Stack Overflow
First I fill the text and then click on tab key to invoke the JavaScript that formats the value in the element. await...
Read more >What You Need to Know About E2E Testing with Playwright
Playwright is a testing and automation framework that enables E2E ... Next, we included the 'page-objects/pages' (diverse classes) for ...
Read more >playwright._impl._api_types.error: execution context was ...
I came into this issue today, and found that this problem occurs in this case: I was use page object loading a url...
Read more >Let's play with playwright using F# scripts. - Marcin Golenia Blog
Playwright's puppeteer-like SDKs promise automatic wait and support for Python/.Net/Node.js/Java. Let's try this stuff in F#!
Read more >Using Playwright Test to run Unit Tests - of Patrick Kerschbaum
This means the test subject is executed directly; this differs from the "usual" way of using Playwright to open a browser, navigate to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The main issue here is that you want multiple playwright objects in the same node process, with their own prototype hacks on it. If you are ok with the same hacks everywhere, then requiring playwright-core directly will work. I don’t think this will ever work cleanly though.
Instead try
typeof import('playwright-core')
.This just needs to use the CDPSession type from the root of playwright instead.
Closing this issue for now as I consider it not a bug. Feel free to keep up the discussion here about internal types, or file new issues for specific things that might be missing/broken.
I really don’t want to support people hacking on our internal code. I’d much rather support your use cases in the public api.