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 |
int a=4857 i need output as 7584.without using any inbuild function?
How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp.
How to Import data from a file (file is on the desktop) to the data table
i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false
What are the disadvantages of vbscript?
Can anyone help me in write coding to get this pattern * ** *** ****
How can you create a file object to work with the files in the vbscript language?
Mention how to assign a date value to a variable?
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
What are the uses of vb script?
Open Yahoo Login Page in that page Suppose i have 100 mails and i want to delete 10'th mail now give procedure & Coding For that Scenario
write a text script to display * as below ********** **** **** *** *** ** ** * * * * ** ** *** *** **** **** **********