Micro Focus QTP (UFT) Forums
Testing field visibility based on checkbox selection - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Testing field visibility based on checkbox selection (/Thread-Testing-field-visibility-based-on-checkbox-selection)



Testing field visibility based on checkbox selection - anthony1carr - 04-02-2012

I have a page which will make input fields visible/invisible depending on the user type selected using checkboxes.

We currently have 13 different user types to select from and up to 12 fields for each user type.

In a nutshell, I would like to:
- Select user type A
- ensure all fields are present for that user
- Deselect user type A and select user type B.

I'm relatively new to QTP, so i'm looking for the best way to approach this problem. Should I use data tables, creating a column for each user type with field names in each corresponding row ?

Any help would be greatly appreciated, some code examples would be great.


RE: Testing field visibility based on checkbox selection - sshukla12 - 04-03-2012

Hi,

It would be better if u use datasheet or separate .xls file which will handle all the different combinations required for ur application because in future if some changes come then it would be easier for u to handle the changes.But please code in such a way that if any extra field is added for a particular user then it should be handled in datasheet only not in ur code .,, ur code must be so generic.

Regards,
Sankalp