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 ?
Answers were Sorted based on User's Feedback
Answer / bfakruddin
Good Satyanj...
expected values in Datatable...!
'Code is here
dim obj_cnt,obj_val,exp_cnt,exp_val
set obj_cnt=object.getitemcount
for i=0 to obj_cnt-1
obj_val=object.getitem(i)
exp_cnt=datatable
("column_Name",dtGlobalSheet).getrowcount
for j=1 to exp_cnt
exp_val=datatable
("column_Name",dtGlobalSheet).value
if (exp_val=obj_val) Then
print "Expected Object is found in
List of Values"
reporter.reportevent
micpass,"Object has been found","Step is passed"
End if
End For
reporter.reportevent micfail,"Object doesn't found",
Next
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / satyanj
First save all item names in DataTable with column
name "FlyFrom" and follow the script:
Val1 = dataTable.Value("FlyFrom")
i = 0
itm = Window("F.R.").WincomboBox("Fly From:").GetItem(i)
If Val1 = itm then
reporter.reportevent 0,"<Step Name> ","<pass>"
else
reporter.reportevent 1,"<Step Name>","Fail"
EndIf
i = i+1
| Is This Answer Correct ? | 2 Yes | 1 No |
Differentiate javascript and vbscript?
Can anybody code this problem for me in VB script - Create an array of 4 elements, increase its size to 7 elements and then find out which of the elements are prime (use functions)
HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?
how to organize files in object repository of qtp
Explain the .wsf files?
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
How do you get the value of a combo box in Javascript?
How will you get a subset of a array in vbscript?
who will create the object?
How will you get a random number between 0 and 1 in vbscript?
Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642
How you can call vbscript functions?