cypress-io / cypress-chrome-recorder

Export Cypress Tests from Google Chrome DevTools' Recorder
MIT License
226 stars 18 forks source link

Add support for xpath and text selector #39

Open jecfish opened 1 year ago

jecfish commented 1 year ago

DevTools Recorder support text and XPath selector from Chrome 108 onwards. I am wondering if there are similar selector in Cypress?

Here is the example step's json.

{
      "type": "click",
      "target": "main",
      "selectors": [
        [
          "aria/Proceed to checkout"
        ],
        [
          "[data-test=checkout]"
        ],
        [
          "xpath///*[@data-test=\"checkout\"]"
        ],
        [
          "text/Total: $0.00"
        ]
      ]
    }
Screen Shot 2022-10-16 at 9 35 19 AM