write vb script code to delete the duplicate values in an
array.
Answer Posted / guest
dim a
aList=Array(5,5,5,5,12,10,15,10,125,5)
Dim sNewList
dim newArray
b= ubound(aList)
For x=0 to b
If InStr(sNewList,(aList(x) & ",")) <= 0 Then
sNewList = sNewList & aList(x) & ","
End If
Next
newArray = split(sNewList,",")
MsgBox sNewList
| Is This Answer Correct ? | 37 Yes | 11 No |
Post New Answer View All Answers
What are parameterizing tests?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
What is text/text area checkpoint?
How to add synchronisation points in qtp?
after initiating one project for testing, when exacltly QTP tester role starts?
how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance
Explain about the test fusion report of quicktest professional (qtp)?
What is exact meaning of Database Checkpoint in QTP 9.2 and what are the different types of the database check points?
How the exception handling can be done using quicktest professional?
What is the architecture of your project? Can any one answer for this question plz........
What is difference between design time and run time data table?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
How to handle Java tree in QTP?
I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)
Explain how you can replace string in qtp?