Plz give the vb script for the following scenerio.
In travel booking we have to select from delhi to mumbai
from the combobox The prices will be display in another
combo box .But i have to select the lowest price for it and
submit it



Plz give the vb script for the following scenerio. In travel booking we have to select from delhi t..

Answer / satyanj

<Obj Hierch>.WinComboBox("From").Select "Delhi"
<Obj.Hier>.WinCombobox("TO").Select "Mumbai"
Itmscnt = <Obj.Hier>.WinComboBox("Price").GetItemsCount
val = <obj.Hier>.WinComboBox("Price").GetItem(0)
For itm = 1 to Itmscnt-1
itmval = <Obj.Hier>.WinComboBox
("Price").GetItem(itm)
If cint(Val) < cint(itmval) then
msgbox "Val is less than itmval"
else
val = itmval
end if
Next
msgbox "Lowest price is: "&val
<Obj.Hier>.WinComboBox("Price").Select val
<Obj.Hier>.WinButton("Submit").Click

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More VB Script Interview Questions

VBscript for QTP,best tutorial?

2 Answers   Wipro,


how to delete folder test3,test4 and test5 using vbscript?

2 Answers  


write a vb script to find simple interest using functions

1 Answers  


How to declare an array in vbscript?

0 Answers  


Explain about the asc function?

0 Answers  






What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?

1 Answers   Infosys,


How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar"

4 Answers   Cap Gemini,


how to add action through AOM in QTP

0 Answers  


after medical test,when will be the police verification

0 Answers   IBM,


how to set one column as primary key in QTP and fetch values accordingly

0 Answers   Ford,


Explain about arrays in vb script?

0 Answers  


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

0 Answers   CSC,


Categories