Jump to content
WAPT Forum
Sign in to follow this  

Extract parameter from semantic URL

Recommended Posts

Apologies if this has been answered before - I couldn't follow the solutions in any similar questions.


We have a system with 'semantic' URLs so instead of


we have


The profile I'm attempting to run includes creating a 'case' and then performing further actions on it. The 'user' completes http://www.domain.com/case/add and is then redirected to the view screen of the case they have just created - the URL of which is (for example) http://www.domain.com/case/48/view.


The response consists of two parts, firstly a redirect - the response body of which is:

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/case/48/view">here</a>.</h2>

and then the http://www.domain.com/case/48/view page. This response body does not contain the CaseID anywhere - it is only in the URL.


I was trying to use the $Search function to set the 'caseID' variable from the first response (the redirect) but I couldn't get it to work - I found this article which confirmed that the variables are only set from the latest response.


I can't use the $UrlParam to get the case ID from the URL due to it being a semantic URL (no ?, = or &). As the response body doesn't not contain the case ID - I have to extract it from the URL. The $Search function only works on the Response Body (it doesn't include the URL) - so how do I do this?


Apologies if this is obvious - all my previous profiles were very straight forward and I'm quite stumped with this issue.


Thanks in advance.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this