Micro Focus QTP (UFT) Forums
Generalised code for identifying validators - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Generalised code for identifying validators (/Thread-Generalised-code-for-identifying-validators)



Generalised code for identifying validators - Ganta - 12-07-2009

Hi,
For a text box(Input field), there are three validators appearing for different type of input.Through QTP i am trying to identify which validator appears.When i look in to the source code for these validators one is present in with single <td) and other which two <td>.How can i write a generalised code for identifying these validators.

Thanks
Ramakrishna


RE: Generalised code for identifying validators - Saket - 12-08-2009

Hi Ramakrishna,

the query is not clear to me, can you please explain a bit.


RE: Generalised code for identifying validators - Ganta - 12-08-2009

Sorry for making you confused with my query.
There is a text box(for example:Amount field, here it shows three different validators for invalid data. 1.for entering value not in the boundary values. 2.for Entering Special characters. 3. for entering decimal points).Now i need to set one value to this field and check one validator excistence that needs to appear and also need to check whether other two validators are not appearing.
In the Website thati am testing is done on .NET, if i see the view source for this text box one validator details are present with in<tr> and single <td> and an end tag and some other validator details are present with in <tr> and two <td>.

So i want a generalised code for identifying these validators and give a message validator one present and validator 2 and validator three are not present.