No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    E2E Testing and Element IDs

    Help
    2
    2
    1084
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dlevin last edited by

      I use Selenium to do E2E tests of a project built using Quasar but I’m running into dead ends when trying to assign IDs to various HTML elements so I can access these elements directly in my tests.

      It’s obviously easy to assign custom IDs to components I’ve written myself, but anytime I use a Quasar component which in turns generates a bunch of HTML elements (often with child elements of their own) I have no way of assigning IDs to these elements and so I can’t access them directly in my tests.

      Am I going about this the wrong way? Is there a better option for E2E testing? Or is the only option to look at the generated HTML code and dig down into child elements manually in the tests?

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        Hi,

        1. Most elements generated by Quasar components have class names. Use that.
        2. Components encapsulate functionality. It’s generally a bad idea to base your tests on Quasar implementation details (such as inner HTML structure) because these details can change at any time without notice (while functionality remains the same). This goes for ANY framework out there.
        1 Reply Last reply Reply Quote 1
        • First post
          Last post