attribute exists verification ?

2 posts, 0 answers
  1. Elo
    Elo  avatar
    1 posts
    Member since:
    Oct 2012

    Posted 22 Nov 2019 Link to this post

    So I have a attribute verification step that looks like this:

     

    AttributeName: readonly

    AttributeName: <blank>

     

    my markup looks something like this

    <input type=text readonly id="text1">

    <input type=text id="text2">

     

    running the step against text1 produces a passed test

    running the step against text2 also produces a passed test, even though the input textbox does not contain the readonly attribute.

     

    Is there a better way to verify the existence of a particular attribute?

    I know how to do this in code, but I'd always avoid code and use the builtin mechanisms first and foremost. :)

     

    running test studio ultimate 2019.2.619.0

  2. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    214 posts

    Posted 26 Nov 2019 Link to this post

    Hello Elo,

    Thank you for sharing details about the test scenario that you want to automate.

    I tried a few things on my end, in order to help you automate this verification without code, but it turns out that is not possible. The Advanced Verification allows you to verify the value of any particular attribute, however, that does not allow to check whether the attribute exists, as it defaults to an empty string.

    I am sorry to bring you the bad news, but you need to stick to a coded solution on this.

    Thank you for your understanding in advance.

    Regards,
    Plamen Mitrev
    Progress Telerik

     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top