replay icon indicating copy to clipboard operation
replay copied to clipboard

CLI never completes execution when there is an error in replay

Open ergunsh opened this issue 2 years ago • 5 comments

Expected Behavior

CLI should report the error and complete the execution

Actual Behavior

Execution hangs and you need to press Ctrl + C to cancel execution

Steps to Reproduce the Problem

  1. Save the attached replay
  2. Run npx @puppeteer/replay <saved-recording-path>

You can make the json pass by removing --wrong from the selector in the click step.

Specifications

  • Version: @puppeteer/replay 0.1.2
  • Platform: MacOS

Attachment

{
  "title": "hn-app-refresh",
  "steps": [
    {
      "type": "setViewport",
      "width": 1280,
      "height": 1361,
      "deviceScaleFactor": 1,
      "isMobile": false,
      "hasTouch": false,
      "isLandscape": false
    },
    {
      "type": "navigate",
      "url": "https://hn-vanilla-pwa.ergunsh.vercel.app/",
      "assertedEvents": [
        {
          "type": "navigation",
          "url": "https://hn-vanilla-pwa.ergunsh.vercel.app/",
          "title": "HN App"
        }
      ]
    },
    {
      "type": "click",
      "selectors": [
        [
          "#postListContainer--wrong > div > div:nth-child(1) > h4"
        ]
      ],
      "target": "main",
      "offsetX": 148,
      "offsetY": 10.5625
    }
  ]
}

ergunsh avatar May 13 '22 12:05 ergunsh

It looks similar to https://github.com/puppeteer/replay/issues/81 the browser close is in afterAllSteps which is not called on error. Would you like to take this issue?

OrKoN avatar May 13 '22 12:05 OrKoN

Sure! I'm creating bugs for my rotation 😬 😂

ergunsh avatar May 13 '22 12:05 ergunsh

🤗

GENERALTHE avatar Oct 21 '22 21:10 GENERALTHE