Note that \w == [a-zA-Z_0-9], i.e. it does not include hyphen.

On 16 November 2017 at 07:56, Felix Schumacher
<felix.schumac...@internetallee.de> wrote:
>
>
> Am 13. November 2017 08:17:42 MEZ schrieb Vamsi Krishna Maddali 
> <vamsi.madd...@qolsys.com>:
>>Hi All,
>>
>>
>>Required your help in resloving below issue:
>>
>>
>>Issue:Unable to capture the authenticate?code value which is generated
>>while logging in to a webpage, authenticate?code value which is being
>>generated is a dynamic value and not following a unique pattarn as in a
>>regular expression kind.
>>
>>
>>What i am trying to do here is capturing the authenticate?code value
>>into a variable named “token” by using the “Regular Expression
>>Extractor” and use that variable in the login script which is used to
>>access the webpage. But the authenticate?code is not being captured in
>>the script and i am not able to use in the login script.
>>
>>
>>My guess is that the Regular Expression Extractor which i am using may
>>not be the correct one, so couldn't capture the authenticate?code value
>>.
>>
>>
>>Can anyone help me in finding a soluion or any other method to handel
>>this situation.
>>
>>
>>Below is the HTML tag in webpage:
>>
>>
>><form id="kc-form-login" class=""
>>action="http://localhost:8080/auth/realms/master/login-actions/authenticate?code=u22yiDCDtV-jm3_1w2NP6HykFCTtePlgADFhFa17U3s&execution=570368df-fa0b-4bd1-9964-251d1448718e&client_id=security-admin-console";
>>method="post">
>
> The token seems to consist of the characters a to z, A to Z, digits, dash and 
> underscore. You can combine those characters into one character class using 
> [a-zA-Z0-9_-] for usage in a regex.
>
> This an be used to extract the token using a regex like
>
> code=([a-zA-Z0-9_-]*)
>
> The character class could probably be shortened to
>
> [\w\d]
>
> Or written as a blacklist
>
> [^;&\s#"']
>
> Regards,
> Felix
>
>>
>>
>>in the below , we are trying to capture
>>“authenticate?code=u22yiDCDtV-jm3_1w2NP6HykFCTtePlgADFhFa17U3s” value
>>and need to send as a parameter in next “Sample Controller”.
>>
>>
>>
>>[cid:28bd9a2c-d267-4bcc-83c7-62b255416835]
>>
>>
>>
>>Thanks,
>>
>>Vamsi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org

Reply via email to