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



How do I check that the names in a weblist are correct e.g in flight application the names of item..

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

How do I check that the names in a weblist are correct e.g in flight application the names of item..

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

Post New Answer

More VB Script Interview Questions

How do display output message without using msgbox function?

5 Answers  


How to copy from one script to another script in qtp

4 Answers  


write a vb script create 5 folders test1 test2 test3 test4 test5

3 Answers  


best training centre in bangalore

2 Answers  


. Program for sorting of numbers in vb script?

2 Answers   Talent Sprint,






Mention the environments where vbscript could be run?

0 Answers  


Check whether given Number is Even or Odd?

2 Answers   HDFC,


Explain about the asc function?

0 Answers  


Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex

2 Answers  


How to take whole text output from screen of Bitmap Application.

0 Answers   CitiGroup,


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

0 Answers  


how to write validation function for date in vb script

0 Answers  


Categories