Micro Focus QTP (UFT) Forums

Full Version: split the values in url .......................
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi

this is my URL which i got from getroproperty


https://cs11.salesforce.com/00QZ0000001J1zV when its fetched i need to split the last 15 characters after.com/

so any one please tell me that code for spliting


a=leadIDtable.GetROProperty("url")
'''' msgbox a
''''
'''' b=right(a,15)
'''' msgbox b
'''' datatable.Value("ID","IDlead")=b
Hi,
Try this

Code:
Dim a
strURL="https://cs11.salesforce.com/00QZ0000001J1zV"
a=Split(strURL,"/")
Msgbox Ubound(a)

Thanks,
Arul.D
you can use below mentioned method also

Code:
dynamicstring=split(a,".com/")

msgbox dynamicstring(1)
Modifying arul's post..

Code:
Dim a
strURL="https://cs11.salesforce.com/00QZ0000001J1zV"
a=Split(strURL,"/")
Msgbox a(Ubound(a))

Regards,
Ankesh