Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance

2 Answers  


Explain about scrrun.dll?

0 Answers  


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..

0 Answers   Amazon,


can anyone tell me the procedure of interview held in applabs

0 Answers  


What are the valid scopes of a variable in vbscript?

0 Answers  


How to Pass Multiple values in functions by using vb script? Function value(arg1,arg2) N1=arg1+arg2 N2=arg1-agr2 N3=arg1*agr2 N4=arg1/arg2 Value= How to pass ? End Function

3 Answers   iGate,


Mention what is variant in vbscript?

0 Answers  


1)How to test whether items in a weblist are in alphabetical order or not?

1 Answers   TCS,


Difference between Function and Sub routine?

0 Answers   Polaris,


what is the purpose of the Reporter.ReportEvent in QTP and also please give the brief description about Reporter.ReportEvent ?

4 Answers   CybAge,


What are keywords in the vbscript language?

0 Answers  


How should i Create Email invite with server-side Coding?

0 Answers   Altair,


Categories