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
what is the differance between BYVAL,BYREF?
What are the naming conventions while declaring a variable in the vbscript language?
what is the standards used for writing the script in QTP
How to Import data from a file (file is on the desktop) to the data table
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
Is VB Script Case sensitive or Case insensitive?
In what way program "hello world" you can write in vbscript?
1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.
If else for do while select in vb script?
Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..
What is the purpose of on error resume next statement?
what is resorceallocation
How will you get a subset of a array in vbscript?
Mention how to create a cookie using vbscript?
Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.