Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create dropdown menu in QTP
#1
Solved: 10 Years, 9 Months ago Shy 
Hi,

In my project, while starting the automation i need a dropdown that prompts the user to select one option from a set of scenarios which has to be executed. Say Automation Starts (F5 ) with the following popup:

Scenario Selection
---------------------
Please Select one option:

[Dropdown having content]

1) Addition
2) Substraction
3) Multiplication
4) Division

So what i need is the code to create dropdown in vbscript.
While googling, i got one thread like we can use IE instance for creating a dropdown. If so, please give me a demo code from which i can start exploring.
Reply
#2
Solved: 10 Years, 9 Months ago
Well i can think of using a simple inputbox

choice=inputbox ("Enter your choice:"&vbNewLine& " Press 1 for Addition" &vbNewLine& " 2 for Subtraction" &vbNewLine& " 3 for Multiplication" &vbNewLine& " 4 for Division")

Select Case choice
Case "1":'call addition function
Case "2":call sub function
Case "3":call mul function
Case "4":call div function
Case else:msgbox "invalid choice"
End Select
Reply
#3
Solved: 10 Years, 9 Months ago Wink 
Thanks for the reply.
But in my case, the selectable scenarios is greater than 12. Presently i've implemented this menu idea. But this menu thing is not feasible in my case. Please let me know if any ideas come up.
Reply
#4
Solved: 10 Years, 9 Months ago
Then create a simple html file with that drop down and automate that page to be shown and capture the selected item in the dropdown and continue with your scipt with select case
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Different Type of Dropdown Selector zunebuggy 6 2,837 05-01-2018, 06:46 PM
Last Post: zunebuggy
  cannot create java virtual machine on QTP 12.02 version richa5685 0 1,852 02-23-2016, 11:18 AM
Last Post: richa5685
  Not able to click text inside the grid dropdown szkapoo 6 4,289 12-20-2014, 09:43 PM
Last Post: supputuri
  Issue related to dropdown selection(Please help urgent) excellentpawan123 2 4,046 05-31-2014, 12:00 PM
Last Post: excellentpawan123
  Handling .NET framework menu in webpage using QTP 10 vishnu1067 0 2,204 05-15-2014, 05:30 PM
Last Post: vishnu1067

Forum Jump:


Users browsing this thread: 1 Guest(s)