Jump to content
WAPT Forum
Sign in to follow this  
trish.mcdonough

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

http://www.domain.com/case/view.aspx?caseid=48

we have

http://www.domain.com/case/48/view

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>
</body></html>

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.

Trish

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...