trish.mcdonough 0 Report post Posted January 13, 2015 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 Quote Share this post Link to post Share on other sites
sergei 0 Report post Posted January 14, 2015 In WAPT Pro you can use JavaScript operator and extract case ID from context.requestHeader. Quote Share this post Link to post Share on other sites
trish.mcdonough 0 Report post Posted January 14, 2015 Thanks for the reply Sergei. Alas I've WAPT 7.1 but at least I know now, it was driving me nuts because I was convinced I was just not using it correctly. Quote Share this post Link to post Share on other sites