Micro Focus QTP (UFT) Forums
Update Multiple Dropdowns without Submit Button - 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: Update Multiple Dropdowns without Submit Button (/Thread-Update-Multiple-Dropdowns-without-Submit-Button)



Update Multiple Dropdowns without Submit Button - mot0rola - 07-08-2013

Hello Everyone,

I am looking to accomplish a task where I have multiple Dropdown menus on a form. Say I have Dropdown1 and Dropdown2. I would like for Dropdown2's values to change based upon the selection of the values in Dropdown1. Now, I know this is relatively trivial with a button click event. However, I would like to accomplish this without any button click and just have Dropdown2 update values based upon what the user has selected in Dropdown1.

I have thought about one approach, and I not sure if this is correct. I am still relatively new to QTP and VBScripting (I've only been working in it for 1 whole day but I have a lot of programming experience). I read I could use the .Show command and then have a loop checking the values of Dropdown1 until ultimately the user clicks the submit button at the bottom which will bring up a new section on the form. I am not sure if there is another way or if someone has already accomplished something along these lines. I appreciate any suggestions, thanks!


RE: Update Multiple Dropdowns without Submit Button - Ankur - 07-09-2013

You can capture values with QTP, you can select options in drop-down in QTP but QTP is a functional testing tool and is not used to change the behavior of your app.