0

I have multiple dynamic elements on single page and element contain multiple data my HTML code is following

onclick="AddRemoveMemberDeal(event,'1494576','cd691c62-32b2-444d-ad6f-79a6104e4ee5','3997800330','Flaxseed Meal','Bobs Red Mill','$2.99','2.99','1/19/2017','85','Whole Ground','Shaw\'s','2','https://products.mygrocerydeals.com/nw/200/0/3/3/3997800330.jpg?deal=cd691c62-32b2-444d-ad6f-79a6104e4ee5&upc=3997800330&chain=194'); return false;"

my recorded script values is following

{"IdMember":"1494576","DealId":"c2b20119-44f2-4839-83c8-5382afd48e04","UPC":"7430500116","Name":"Regular Apple Cider Vinegar","Brand":"Bragg","Custom_Price":"$5.49","Price":"5.49","Sale_End":"1/5/2017","Score":"80","Description":"null","ChainName":"Stop & Shop","CategoryId":"2","ImageURL":"https://products.mygrocerydeals.com/generic/baking-goods.jpg?deal=c2b20119-44f2-4839-83c8-5382afd48e04&upc=7430500116&chain=204"}

how can I extract all values dynamically?

Naveen Kumar R B
  • 6,248
  • 5
  • 32
  • 65
H.M
  • 1
  • 2

1 Answers1

0

You need to use Regular Expression Extractor (Post processor) which applies the regex on the HTTP Response and retrieve the values using groups.

Keep the Regex Extractor under the HTTP Sampler against which response you want to apply regex and retrieve the data.

Reference Name field is the variable in which the value will be saved.

References:

  1. http://jmeter.apache.org/usermanual/regular_expressions.html
  2. https://guide.blazemeter.com/hc/en-us/articles/207421325-Using-RegEx-Regular-Expression-Extractor-with-JMeter
  3. Caprture multiple values in Single Regex Extractor
Community
  • 1
  • 1
Naveen Kumar R B
  • 6,248
  • 5
  • 32
  • 65