What does SPLIT and JOIN commands do in Vbscript?
Answers were Sorted based on User's Feedback
Answer / chaitu
Split function is builtin function in QTP
it helps us to divide the string at desired place in a
string
for Ex:-
a = "C:/programmfiles/chaitufolder/chaitanya.doc"
here i want to change the file name of .doc then we can use
x = Split(a,"/") then we will get like this
split function
msgbox x(0) 'it shows this C:
msgbox x(1) 'it shows this programmfiles
msgbox x(2) 'it shows thischaitufolder
msgbox x(3) 'it shows this chaitanya.doc
| Is This Answer Correct ? | 22 Yes | 2 No |
Answer / vj
I disagree with LEO.
SPLIT function is an inbuilt function of QTP.
| Is This Answer Correct ? | 16 Yes | 1 No |
Answer / bhavna khurana
Even I disagree with leo, SPLIT function is an inbuilt
function of QTP. But the normal Split function can't help
you in this case.
Use Instr to find the position of next sequence. e.g.
current="AA"; next="BB"
nextIndex=Instr(0, inputString, next, 1)
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / mike
It works just fine as quoted above (once you remark out the editorial comments). Whether its native to QTP or part and parcel of VB is irrelevant. The scripter doesn't necessarily care if the command is native to VB, QTP, or both as long as it works. And it works. Kudos to Chaitu for a quick and easy solve.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / leo
Split function is a vb script function not built into
qtp..if you dont know the answer dont mislead othere....
| Is This Answer Correct ? | 12 Yes | 20 No |
str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to display the T
How to handle Dynamically changing Objects in QTP?
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
How to insert screenshot on to the body of outlook? -1 how to use insert-picture tab in new email outlook to insert image in the body. Suggest something.......
what are the areas that cannot be tested using an automated tool? list a few
Can I compare two DataBases using QTP ?
What is the difference between Image Checkpoint and Bitmap Checkpoint?
Need one Urgent help please,for ex: first time i created Local reposory and convert that local to shared Rep and save in some where(by using Export local objetcs), unfortunately that saved repository is missed, now i want same repository,but iam not able to export the same repository second time?? i need that Repository only how to get???
If an application name is changes frequently i.e while recording it has name "Window1" and then while running its "Windows2" in this case how does QTP handles?
write a test script in QTP to test the text that written in an image(i.e jpg)of a web page???
i did B.Tech cse and i secured 76%. instead of siting at home ... i would like to do some course. can u suggest me in this.
Can any one explain about environment variables with examples?