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 the difference in testing a client-server application and a web application?

0 Answers  


What is keyword driven framework?

0 Answers  


Hi, I Would Like to Know which is the Best QTP Certification Training Institute in Hyd? Thanks in Advance kishan

1 Answers  


Can we record an application running on a remote machine using qtp?

0 Answers  


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

0 Answers  






Hi All Below is my script which i made for lgin into Flight.exe. SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open" Dialog("Login").WinEdit("Agent Name:").Set DataTable ("p_Text", dtGlobalSheet) Dialog("Login").WinEdit("Agent Name:").Type micTab Dialog("Login").WinEdit("Password:").SetSecure DataTable ("p_Text1", dtGlobalSheet) Dialog("Login").WinButton("OK").Click If Dialog("Login").Dialog("Flight Reservations").WinButton ("OK").exist Then Dialog("Login").Dialog("Flight Reservations").WinButton ("OK").Click datatable.Value(3)= "Incorrect password. Please try again" Dialog("Login").WinButton("CANCEL").Click elseif Dialog("Login").Dialog("Flight Reservations").WinButton("OK").exist Then Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click datatable.Value(3)="Please enter agent name" Dialog ("Login").WinButton("CANCEL").Click elseif Dialog("Login").Dialog("Flight Reservations").WinButton("OK").exist then Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click datatable.Value(3)= "Please enter password" Dialog("Login").WinButton ("CANCEL").Click else Window("Flight Reservation").Move 309,146 datatable.ExportSheet "C:\Raj\Result.xls" ,1 Window("Flight Reservation").Close End If I want to capture the Message string from Dialog("Login").Dialog("Flight Reservations" Also pls let me know if this is the right way to do the script for login. Pls provide some script for login Flight.exe Thanks in advance Raj Dhiman

1 Answers  


In qtp, how you can use xpath to identify objects?

0 Answers  


How to pass parameters to Actions Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

0 Answers  


What is API?

1 Answers  


Hi, I will provide perticular age,it needs to enter date in text box (MM/DD/YYYY) compare to system date. or already exist data in the text box.

2 Answers   Virtusa,


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

0 Answers  


Categories