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 |
what is framework in QTP? any one give me answer
when qtp recognizes a web link like (hyper link)wich properties it is going to take to identify the objects unquely? what is Ini file in QTP?
how to click on object? (with out knowing the object details) for ex: in a webpage one link is available.i want to click that link by using one menthod through qtp?
Hi,will U Please Provide me details certification for QTP &QC and also please provide me the Material also. Send to mail:jjaanu2mail@gmail.com
I am verifying the actual vs the input value to make sure that they been entered correctly. In the Global Sheet I have a column called Customer with the multiple names in each row and now I am trying to capture the value during runtime under the column name Customer_in_Apps. Somewhat it works but during runtime the values are being stored in each column vs each row i.e., Customer_in_Apps, Customer_in_Apps1. Automatically it add columns instead of rows. row=datatable.getsheet("Global").GetRowCount for x=1 to row datatable.getsheet("Global").SetCurrentRow(x) Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Val1=Datatable.Value("Customer",dtGlobalSheet) Val2 = Datatable.GlobalSheet.AddParameter("Customer_in _Apps",runtimevalue) If (trim(Val2)=trim(Val1)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &_Val2 else Reporter.ReportEvent micFail, "Customer validation unsuccessful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &Val2 End If Next
Explain how you can replace string in qtp?
Write a command for setvalue function in a webedit
How do u do batch testing in WR & is it possible to do in QTP, if so explain?
What are the features and benefits of quick test pro (qtp 8.0)?
QTP identifying the child tabs in a maintab like tab_1,tab_2,tab_3,tab_4 while using a for loop for these tabs.its not proceeding from _1 to _2. How can i use "for loop "
how did u use automating testing tools in ur job?
How to send the qtp results file by email (Lotus notes).