write vb script code to delete the duplicate values in an
array.
Answer Posted / bhaskar sarma
Input = Array(6,6,6,7,6,75,78,75,75,6,66,6.6)
count = 0
arr = ","
for Bye =0 to ubound(input)-1 step 1
for Hello=Bye+1 to ubound(input) step 1
if strcomp(Input(Bye),Input(Hello),1)=0 AND instr(1,arr,Input(Hello))<=0 then
count = count + 1
arr = input(Hello) & ","
exit for
end if
next
next
msgbox count
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object
how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief
What is the difference between per-action and shared?
how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page
Explain in brief about the quicktest professional automation object model?
What is qtpro? What is quick test pro? What is a quick test professional?
hi i want license key for qtp 9.2 pls its adjust product name : quick test professional locking code :8 - 54A6A license type : seat license maintenance number : 88888888-8888 pls send license key to my email id borusu.ramkumar@gmail.com
How to handle Java tree in QTP?
What is action split and the purpose of using this in qtp?
I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
How do Parameterization and Data-Driving relate to each other in QTP?
How to use the object spy in quicktest professional 8.0 version?
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))