Giter Site home page Giter Site logo

Comments (9)

aviyadeveloper avatar aviyadeveloper commented on May 21, 2024 7

Just adding some support to this. A setting that allows to give some priority to specific data tags would be great!

from cypress-recorder.

adam-stover avatar adam-stover commented on May 21, 2024 4

PR From @estruyf has added support for data-cy, data-test, and data-testid attributes. Will work on ability to customize!

from cypress-recorder.

adam-stover avatar adam-stover commented on May 21, 2024 1

@Fasani Correct! The PR from @estruyf has been merged and this version (1.0.5) is live on the Chrome Store.

from cypress-recorder.

kassuro avatar kassuro commented on May 21, 2024

Would love this feature as well, since it detects only the ids for us, but those are generated from the ui library we use, so I would need to rewrite most of the script to use the data tags instead 😞

from cypress-recorder.

Fasani avatar Fasani commented on May 21, 2024

To understand this better.

Assuming I want to test a login. I could add β€˜data-cy’ attributes to my login and password inputs as well as the submit button.

And the recorder would use those elements via their data attr so I end up with generated code which would be more like below:
cy.get('[data-cy=username]')
cy.get('[data-cy=password]')
cy.get('[data-cy=button]')

Which would mean that when I refactor my code later on... as long as I keep the data attributes, my tests would quite likely not need to be refactored? Correct?

from cypress-recorder.

Fasani avatar Fasani commented on May 21, 2024

Also the PR from @estruyf was merged or not yet?

from cypress-recorder.

Fasani avatar Fasani commented on May 21, 2024

@adam-stover ty

from cypress-recorder.

aviyadeveloper avatar aviyadeveloper commented on May 21, 2024

this is great!

from cypress-recorder.

adam-stover avatar adam-stover commented on May 21, 2024

Thanks for the requests. Thanks as well @estruyf for the implementation. Merged in #150 and released in https://github.com/KabaLabs/Cypress-Recorder/releases/tag/v1.0.5

from cypress-recorder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.