or run

npx @tessl/cli init
Log in

Version

Files

docs

browser-contexts.mdbrowser-management.mdelement-handling.mdindex.mdinput-simulation.mdlocators-selectors.mdnetwork-management.mdpage-interaction.md
tile.json

rubric.jsonevals/scenario-9/

{
  "context": "This evaluation assesses how well the engineer uses Puppeteer's target management APIs to implement custom target filtering and page detection logic. The focus is on proper usage of Browser.connect(), browser.targets(), Target methods, and implementing custom filtering predicates.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Browser Connection",
      "description": "Uses puppeteer.connect() or puppeteer-core's connect method to establish connection to browser via WebSocket endpoint provided in constructor",
      "max_score": 15
    },
    {
      "name": "Target Retrieval",
      "description": "Uses browser.targets() method to retrieve all targets from the connected browser instance",
      "max_score": 15
    },
    {
      "name": "Target Type Filtering",
      "description": "Correctly uses target.type() method to filter targets by their type (page, worker, service_worker, browser, etc.) based on the allowedTypes configuration",
      "max_score": 20
    },
    {
      "name": "DevTools Exclusion",
      "description": "Uses target.url() method to identify and exclude DevTools targets (URLs starting with 'devtools://') when excludeDevTools configuration is enabled",
      "max_score": 15
    },
    {
      "name": "Custom Page Detection",
      "description": "Implements and applies the custom isPageTarget predicate function to determine which targets should be treated as pages, properly passing target objects to the predicate",
      "max_score": 20
    },
    {
      "name": "Resource Management",
      "description": "Properly closes the browser connection using browser.disconnect() or browser.close() in the close() method to prevent resource leaks",
      "max_score": 10
    },
    {
      "name": "Filter Combination",
      "description": "Correctly combines multiple filter criteria (allowedTypes, excludeDevTools, isPageTarget) when multiple are specified, applying filters in appropriate sequence",
      "max_score": 5
    }
  ]
}