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 |
How do display output message without using msgbox function?
How to copy from one script to another script in qtp
write a vb script create 5 folders test1 test2 test3 test4 test5
best training centre in bangalore
. Program for sorting of numbers in vb script?
Mention the environments where vbscript could be run?
Check whether given Number is Even or Odd?
Explain about the asc function?
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
How to take whole text output from screen of Bitmap Application.
Which keyword is used to declare a variable in the vbscript language?
how to write validation function for date in vb script