Hi,
I am trying to parse a POST response to get a session ID but getting the error:
I am 100% sure that regular expression is OK. It is defined on Step coniguraion screen as:
I suppose the issue is related to parsing a response in a raw format:
Request
Response
But in a raw format the response is:
How can I get the "top.name=" value? Is it possible?
I am trying to parse a POST response to get a session ID but getting the error:
Code:
Step "Logging in" [2 of 3] failed: error in step variables "{bw_id}=regex:top.name='([0-9a-z]{32})'": cannot extract the value of "{bw_id}" from response
{bw_id}=regex:top.name='([0-9a-z]{32})'
Request
Code:
POST http://a.x.x.x:8080/servlet/Turbine/action/pcp.PLoginHandler/event1234submit/doLogin/frm/single/lang/en_US/ HTTP/1.1 Host: a.x.x.x:8080 Connection: keep-alive Content-Length: 39 Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Origin: http://a.x.x.x:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Content-Type: application/x-www-form-urlencoded Referer: http://a.x.x.x:8080/servlet/Turbine/frm/single/ Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.8,ru;q=0.6 Cookie: JSESSIONID=89FCCCC7EA680EDE665A0DFA898C6FB0; locale=en-US; pem_skin_version=3
Response
Code:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=885950DFDB6691BC5D6BB906C2FC6A65; Path=/; HttpOnly Cache-Control: max-age=600 Expires: Mon, 25 May 2015 10:11:00 GMT Content-Type: text/html;charset=ISO-8859-1 Content-Length: 185 Date: Mon, 25 May 2015 10:01:00 GMT
But in a raw format the response is:
Code:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=885950DFDB6691BC5D6BB906C2FC6A65; Path=/; HttpOnly Cache-Control: max-age=600 Expires: Mon, 25 May 2015 10:11:00 GMT Content-Type: text/html;charset=ISO-8859-1 Content-Length: 185 Date: Mon, 25 May 2015 10:01:00 GMT <html><head><script>top.name='2ad22b822bbe9008f240708eb1de8d85'; top.location.href='/workspace.html?bw_id=2ad22b822bbe9008f240708eb1de8d85&cp=prv';</script></head><body></body></html>
How can I get the "top.name=" value? Is it possible?
( or cloudblue these days ) i am trying to do the same thing, to measure login time and to see if the cp is available.
Comment