0

In JMeter, using a post processor Regular Expression Extractor, i want to extract the form's action attribute. What regular expression should i use?

ZiggY
  • 111
  • 1
  • 9

2 Answers2

1

You should not be using regular expression to parse HTML, go for XPath Extractor instead and use query like

//form/@action

See XPath Tutorial and Using the XPath Extractor in JMeter for more details.

Community
  • 1
  • 1
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

I could not get the XPath Extractor to work; from reading the JMeter log, it looks like the XPath Extractor will not work if the html being parsed is not well-formed xml.

But, I was able to extract the form action using a CSS Selector Extractor with the following values:

  • CSS Selector expression: form
  • Attribute: action
  • Match No. (0 for Random): 1
Tom Regan
  • 3,580
  • 4
  • 42
  • 71