0

I want to fetch OTP value(123456) from Div tag, as it changes every time.
How can i do this in Jmeter? I have some idea that, it can done by xpath extractor & reguler expression..but doesn't successful in dong so.. Please help me. Code Sample is like this.

<div id="messages">
<div class="section clearfix"> 
<div class="messages status"> 
<h2 class="element-invisible">Status message</h2> OTP has been sent to your registered email id.  OTP is 123456</div></div></div>


I want OTP value in a variable...so that i can use that dynamically.

1 Answers1

1

Use Regular expression extractor as a post processor like,

enter image description here

Later you can use that value anywhere using ${OTP_val} variable

Nachiket Kate
  • 8,473
  • 2
  • 27
  • 45