Solved
Forum Discussion
Radford
9 years agoSuper Contributor
I'm assuming that your string is always a URL, if so the following should work:
def urlFromResponse = context.expand( '${#TestSuite#url_link}') def thirdSlashIndex = urlFromResponse.indexOf('/', 9) def partialString = urlFromResponse.substring(thirdSlashIndex)
The indexOf looks for the first occurance a slash, from character 9 of your string, i.e. after the "https://".