'FAQ, Functions
'Functions (strcomp, mid, split, instr, replace,filter etc)
temp="Welcome BAck"
temp1="Welcome Back"
temp2="Welcome, Mr. James, Way, JamBach"
temp3="come"
'SPLIT()
text=split(temp2,",")
limit=ubound(text)
For i=0 to limit
msgbox text(i)
Next
'FILTER
text1=filter(text,"Jam")
limit=ubound(text1)
For i=0 to limit
msgbox text1(i)
Next
'REPLACE()
text=replace(temp,"JP","a")
msgbox text
'INSTR()
text=Instr(1,temp1,temp3)
msgbox text
'MID()
text=mid(temp1,4,3)
msgbox text
'STRCOMP() Binary & Text Comprison
If strcomp(temp,temp1,0)=0 Then
msgbox "Pass"
else
msgbox "Failed"
End If
'Functions (strcomp, mid, split, instr, replace,filter etc)
temp="Welcome BAck"
temp1="Welcome Back"
temp2="Welcome, Mr. James, Way, JamBach"
temp3="come"
'SPLIT()
text=split(temp2,",")
limit=ubound(text)
For i=0 to limit
msgbox text(i)
Next
'FILTER
text1=filter(text,"Jam")
limit=ubound(text1)
For i=0 to limit
msgbox text1(i)
Next
'REPLACE()
text=replace(temp,"JP","a")
msgbox text
'INSTR()
text=Instr(1,temp1,temp3)
msgbox text
'MID()
text=mid(temp1,4,3)
msgbox text
'STRCOMP() Binary & Text Comprison
If strcomp(temp,temp1,0)=0 Then
msgbox "Pass"
else
msgbox "Failed"
End If
QTP is most popular and trusted platform to perform function testing. Your article is very useful for software testing professionals thanks for sharing.
ReplyDeletetesting training in chennai