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 |
Write a program to print all lines that contains a word either “testing” or “qtp”
Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...
How can I write HTML text to the window in VB Script?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.
Write VB script to convert from feet to inches(hint 1feet=12 inches)
How will you convert a given number to long in vbscript?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
In html file what is an ideal position to include vbscript?
Explain sga memory structures?
What is purpose of scripting.filesystemobject class in vbscript?
in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script