[Python] How to Extract Failed Selector URLs from Cypress Tests and Log Them

Discussão em 'Python' iniciado por Stack, Abril 15, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on a self-healing project for Cypress, and I need to extract URLs that have failed selectors from my test files (.cy.js). My goal is to automatically log these URLs into a file for further analysis.

    If a test fails due to a missing element, I want to log it in a way that's easily readable, like:


    {
    "url": "http://example.com/page",
    "failedSelectors": ["#nonexistent-element", ".another-failed-selector"]
    }

    Continue reading...

Compartilhe esta Página