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 ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can u describe what kind of testing are for OTC derivates by banks.

1668


what is used of Property........End Property loop ? how to write the script for it?

1688


Explain about the functionality of vb script?

576


Why is the use of exit do or exit for statements within loops discouraged?

569


What is the event handling in vbscript?

563






Explain different types of segment?

570


How to Enter Values on the Command promt using VB script

1534


Which keyword is used to declare a variable in the vbscript language?

531


What is the use of option explicit in vbscript?

544


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

544


Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

803


Write a code to print numbers from 5 to 0?

676


In html file what is an ideal position to include vbscript?

814


who will create the object?

1721


How can the spaces from the string be removed?

593