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
Answer Posted / 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 View All Answers
How to capture a runtime error in vbscript?
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
Out of the different type of operators, which are evaluated first and last in the vbscript language?
What are lbound and ubound in the vbscript language?
How to create a cookie using vbscript?
Which in-built function related to an array joins substrings into one string in the vbscript language?
How will you convert a given number to long in vbscript?
Which operator is used to perform the comparison among 2 operands in the vbscript language?
write a program to display configuration of a local system with the help of vb script.
how to increasing the numbers in a given text box please write a vb script
What is the technology used by vb script?
Illustrate briefly about the different types of statement
Mention the rules for using option explicit statement?
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?