Micro Focus QTP (UFT) Forums

Full Version: Update Multiple Dropdowns without Submit Button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.