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

Explain the string concatenation function in vbscript?

0 Answers  


what is the function to get the ascii value of the character?

6 Answers   Netxcell, Oracle,


What are events in the vbscript language?

0 Answers  


how to write code: to check whether the window of an Application Under Test exist or not . plz give with example

2 Answers  


How can we return a value from User Defined Function ? For Eg. we have 2 functions. In Fun1 i am getting 2 values (a,b) and i am addding those 2 and storing in to another var (c). Now i want to pass that var(c) to another function (fun2). What will be the script?

6 Answers   Nous,






How are values assigned to string type and numeric type variables?

0 Answers  


Which operator can be used to check if two numbers are equal or not in vbscript?

0 Answers  


How do I check that the names in a weblist are correct e.g in flight application the names of item are Denver, paris,London, etc. How do I ensure the correct item is displayed from the list after doing item count ?

2 Answers   IBM,


Mention how to access array data?

0 Answers  


How will you get a string with the specified character the specified number of times in vbscript?

0 Answers  


who will create the object?

0 Answers   TCS,


What is dictionary object in vbscript? Explain?

0 Answers  


Categories