This is a migrated thread and some comments may be shown as answers.

attribute exists verification ?

1 Answer 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Elo
Top achievements
Rank 1
Elo asked on 22 Nov 2019, 09:28 AM

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

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 26 Nov 2019, 12:31 PM

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!
Tags
General Discussions
Asked by
Elo
Top achievements
Rank 1
Answers by
Plamen Mitrev
Telerik team
Share this question
or