How can i select multiple values from drop down list using
vb script in qtp?
and wt is the script for clicking msg box box automatically
with a specific time.

Thanks in advance...Kalyani.

Answers were Sorted based on User's Feedback



How can i select multiple values from drop down list using vb script in qtp? and wt is the script..

Answer / sasmita

object.ExtendSelect Item -> This you can use to select
multiple items from a drop down list.

Ex:
'The following example uses the ExtendSelect method to
select multiple, non-consecutive items in a list.

Browser("FastFoodHaven").Page("KidsMeals").JavaApplet
("Foodlist").JavaList("Entrees").Select "Hamburger"

Browser("FastFoodHaven").Page("KidsMeals").JavaApplet
("Foodlist").JavaList
("Entrees").ExtendSelect "ChickenSandwich"

Browser("FastFoodHaven").Page("KidsMeals").JavaApplet
("Foodlist").JavaList("Entrees").ExtendSelect "HotDog"

Is This Answer Correct ?    8 Yes 2 No

How can i select multiple values from drop down list using vb script in qtp? and wt is the script..

Answer / bhargavi

Set x =CreateObject(”WScript.Shell”)
x.Popup “message content”, 5, “msg header”, (0+48)

the above code will close the msgbox after 5sec

but where as selecting multiple items in a list box i never
tried it

Is This Answer Correct ?    5 Yes 8 No

Post New Answer

More QTP Interview Questions

Hi, I have 50 test cases for automation, Based on which criteria we can decide for these test cases we have to use Descriptive programming and remaining for general coding? Thanks In Advance..Kavitha

2 Answers  


How to retrieve value (data) from notepad using QTP ?

5 Answers   Health Care,


How can I generate customized logs in QTP ?

2 Answers   Ordain Solutions,


How can you delete the results file (XML)

2 Answers  


What are the types of environment variables in qtp?

0 Answers  






Explain Checking XML....

1 Answers   Crea,


For the below written code , i want to be stop the loop (ex:10 times), but it is focusing to first line of the code & generating error. vbwindow("vbname:=frmMain").Type micAltDwn + "6" + "2" + "D" +micAltUp 'wiil open the particular window in application vbwindow("vbname:=frmDeduction").vbbutton("vbname:=cmdNew").Click DataTable.ImportSheet"F:\QTP VBScript\Form 26-1.xls","Deduction",Global RowCount = DataTable.GetSheet("Global").GetRowCount i=RowCount For j =1 to i 'vbwindow("vbname:=frmDeduction").WinObject("nativeclass:=DataComboWndClass","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type DataTable("Section", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micTab vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtOfPay").Set DataTable("Amount_of_Payment", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Set DataTable("Amount_PaidCredited_Date", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type DataTable("Deduction_is", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micTab vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdSave").Click DataTable.SetNextRow Next vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdClose").Click

0 Answers  


How to check the URL using Automation tool QTP

2 Answers  


How can we call Winrunner functions from QTP?

1 Answers  


QTP identified the object but not performing the desired action???what could be the reason?????

1 Answers   Mphasis,


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

0 Answers  


What is descriptive.create () in QTP?

3 Answers  


Categories