What does SPLIT and JOIN commands do in Vbscript?

Answers were Sorted based on User's Feedback



What does SPLIT and JOIN commands do in Vbscript?..

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

What does SPLIT and JOIN commands do in Vbscript?..

Answer / vj

I disagree with LEO.

SPLIT function is an inbuilt function of QTP.

Is This Answer Correct ?    16 Yes 1 No

What does SPLIT and JOIN commands do in Vbscript?..

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

What does SPLIT and JOIN commands do in Vbscript?..

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

What does SPLIT and JOIN commands do in Vbscript?..

Answer / veena

i agree with leo

Is This Answer Correct ?    2 Yes 9 No

What does SPLIT and JOIN commands do in Vbscript?..

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

Post New Answer

More QTP Interview Questions

what is difference between calling a function and reusing an action?

1 Answers  


VB - Script Training in MUMBAI.

1 Answers  


what is a test strategy & what is the difference between test strategy & test plan?

5 Answers  


Hi, I am trying to automate the web application for generating Reports.I am facing issue with IE while running the script. After 4 report IE crashes.I am using QTP 9.5 with IE version 7. Can anubody give me solution for this issue. Thanks in advance-Jyotsna

0 Answers  


what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent

0 Answers  


what is syncurnisation point? what is the use of this in real time environment? plz explain?

6 Answers   AppLabs,


What is the concept of hooking in QTP?

1 Answers  


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

0 Answers  


What is Version control?

3 Answers  


How we can import data from database?

0 Answers  


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

0 Answers  


how to choose the framework in qtp ? 2)when we go for the descriptive programming ?

2 Answers   Syntel,


Categories