All Projects β†’ domderen β†’ playwright-session

domderen / playwright-session

Licence: Apache-2.0 license
Visual Debugger for Playwright automation.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to playwright-session

stylish-log
πŸŽ‰ Stylish-log "A beautiful way to see your web console logs"
Stars: ✭ 12 (-69.23%)
Mutual labels:  debugger
playwright-jest-boilerplate
No description or website provided.
Stars: ✭ 16 (-58.97%)
Mutual labels:  playwright
talvos
Talvos is a dynamic-analysis framework and debugger for Vulkan/SPIR-V programs.
Stars: ✭ 67 (+71.79%)
Mutual labels:  debugger
vscDebugger
(Partial) Implementation of the Debug Adapter Protocol for R
Stars: ✭ 58 (+48.72%)
Mutual labels:  debugger
gdb
Go GDB/MI interface
Stars: ✭ 70 (+79.49%)
Mutual labels:  debugger
react-native-debug-console
A network and console debug component and modal for react native purely in JavaScript
Stars: ✭ 17 (-56.41%)
Mutual labels:  debugger
app
Buggregator is a beautiful, lightweight debug server build on Laravel that helps you catch your smpt, sentry, var-dump, monolog, ray outputs. It runs without installation on multiple platforms.
Stars: ✭ 259 (+564.1%)
Mutual labels:  debugger
playwright-vscode
Playwright Test Visual Studio Code integration
Stars: ✭ 144 (+269.23%)
Mutual labels:  playwright
test-real-styles
(test-)framework agnostic utilities to test real styling of (virtual) dom elements
Stars: ✭ 37 (-5.13%)
Mutual labels:  playwright
kodi.web-pdb
Web-based remote Python debugger for Kodi addons
Stars: ✭ 73 (+87.18%)
Mutual labels:  debugger
vscode-android-webview-debug
Debug your JavaScript code running in WebViews on any Android device from VS Code.
Stars: ✭ 18 (-53.85%)
Mutual labels:  debugger
playwright-jest-examples
Demonstrates the usage of Playwright (cross-browser automation library in Node.js) in combination with Jest on GitHub Actions to test various setups.
Stars: ✭ 79 (+102.56%)
Mutual labels:  playwright
ps2rd
Collection of tools to remotely debug PS2 games
Stars: ✭ 55 (+41.03%)
Mutual labels:  debugger
cc-tool
Mirror of cc-tool from SourceForge
Stars: ✭ 144 (+269.23%)
Mutual labels:  debugger
browser-pool
A Node.js library to easily manage and rotate a pool of web browsers, using any of the popular browser automation libraries like Puppeteer, Playwright, or SecretAgent.
Stars: ✭ 71 (+82.05%)
Mutual labels:  playwright
console
a debugger for async rust!
Stars: ✭ 2,101 (+5287.18%)
Mutual labels:  debugger
Devel-Camelcadedb
Perl module for debugging with Perl5 plugin for IntelliJ
Stars: ✭ 23 (-41.03%)
Mutual labels:  debugger
gopherlua-debugger
a gopherlua debugger based on emmylua and gopher-lua
Stars: ✭ 15 (-61.54%)
Mutual labels:  debugger
jsrdbg
JavaScript Remote Debugger for SpiderMonkey.
Stars: ✭ 23 (-41.03%)
Mutual labels:  debugger
Love-Debug-Graph
An fps/memory/misc graph utillity for LΓΆve2D
Stars: ✭ 29 (-25.64%)
Mutual labels:  debugger

Playwright-Session

Build & Publish npm

Playwright-Session UI visualizes a recorded Playwright session in a UI containing:

  • Video from the session,
  • DOM HTML Viewer,
  • Network Requests Viewer,
  • Console Viewer,
  • Playwright actions listed in console view to easily understand what your script was doing,

Playwright-Session in action

Recording Session

To record your own Playwright session, start by adding this package to your project:

npm install playwright-session --save-dev

Once you have the package installed, you need to initialize your playwright script with the recorder:

import { chromium } from "playwright";
import initializeRecorder from "playwright-session";

(async () => {
  const browser = await chromium.launch();

  // Recorder is initalizing required events collection,
  // to later be able to replay a Playwright session in the UI.
  // Session file, that can be loaded in the UI,
  // will be saved to ./vuetify-session-events.ldjson
  const { page, context } = await initializeRecorder(
    browser,
    "vuetify-session-events"
  );

  await page.goto("https://vuetifyjs.com/en/");

  await page.evaluate(() => console.log("Adding sample console log 1"));
  await page.evaluate(() => console.warn("Adding sample console log 2"));
  await page.evaluate(() => console.info("Adding sample console log 3"));
  await page.evaluate(() => console.error("Adding sample console log 4"));
  await page.evaluate(() => console.debug("Adding sample console log 5"));

  await page.click('a[href="https://github.com/en/getting-started/quick-start/"]');

  await page.click('text="UI Components"');

  await page.click('text="Form inputs & controls"');

  await page.click('text="Forms"');

  await page.waitForSelector('#usage .v-example input[type="text"]');

  const inputs = await page.$$('#usage .v-example input[type="text"]');

  await page.click("#usage h2");

  // Adding timeouts here, to show down Playwright,
  // and make recorded session a bit smoother.
  await new Promise((r) => setTimeout(r, 1000));

  await inputs[0].fill("Welcome");
  await new Promise((r) => setTimeout(r, 500));
  await inputs[1].fill("To");
  await new Promise((r) => setTimeout(r, 500));
  await inputs[2].fill("Playwright-Session");

  await new Promise((r) => setTimeout(r, 3000));

  await browser.close();
})();

Replaying Session

Once you have your session file recorded, head over to the Playwright-Session UI, upload your session file by clicking on the Upload button in the top-left corner of the UI, and play your session. You can also provide a link to your custom session file via a query string parameter like this: https://playwright-session.hotdata.co/?session_url=https://playwright-session.hotdata.co/vuetify-session-events.ldjson.

API

/**
 * Bootstraps session recording on top of the open browser connection.
 * Session recording will be saved to a file defined by `sessionFilePath` argument.
 * Once bootstrapped, this function will return a new BrowserContext & Page.
 * @param browser ChromiumBrowser Browser instance.
 * @param [sessionFilePath] [OPTIONAL] Path where session recoeding file should be saved.
 * Defaults to `${process.cwd()}/playwright-session-events-${new Date().toISOString()}.ldjson`.
 * @param contextOpts [OPTIONAL] Options that can be passed to `browser.newContext` call, used when creating new BrowserContext.
 */
export default async function initializeRecorder(
  browser: ChromiumBrowser,
  sessionFilePath: string = undefined,
  contextOpts: any = undefined
): Promise<InitializeRecorderResponse>;

/**
 * Recorder is extending browser methods, and returns both page & context objects for further modifications.
 */
type InitializeRecorderResponse = {
  page: Page;
  context: ChromiumBrowserContext;
};
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].