I have a list box which contains duplicate values e.g.
A,A,A,B,B,B,C,C,C.Now write a code in qtp to test the list
box .
Scenario #1 : I have to check whether any values are there?
Scenario #2 : If duplicate values are there,then how many
time it is getting duplicated?
Svenario #3 : how can I test presence of items in list box
ommiting duplicate values?

Answer Posted / sayani sur

Ganesh thanks for the answer but please provide clarification for below....

1. Can I use childobject.AllItem in place of getROProperty(items Count)?

2 . as u told i have to store all weblist items into an array..will u please tell me how can i insert these values/weblist items into an array...

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What test you perform mostly? Regression or retesting in your testing process?

574


Are Shared ORs read-only?

628


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1389


assume i have few url link how will i dynamically call then using descriptive programming?

1601


how to explain a claims and insurance project?

1749






if anyone has idea of the interview procedure in covansys, plz send me a mail?

1530


When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.

1603


what is the diff b/w assistive and mandatary rules of object repository in QTP???

1611


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

1422


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

1334


How the exception handling can be done using quicktest professional (qtp)?

569


If I change the property value at runtime is it effect is object repository?

607


What is keyword driven framework?

618


How to execute a winrunner script in quicktest professional (qtp)?

518


How to define array in qtp?

575