0

I simply added a class ".script_class" to my script tag to find it.

Then my JMeter settings are:

Name of created variable: content
CSS Selector expression: .script_class
Default Value: Not_Found

While other tags like <b> save their inner text in the content variable, it stays empty for the script tag. It doesn't show the default value, so it did get found by my expression.

Is there a way to save the inner text of my script tag into the content variable and then extract it for further use?

1 Answer 1

1

I don't think it's possible to do with CSS Selector Extractor, consider switching to XPath Extractor which has text() function:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Sadly I can't use XPath Extractor because of random weird end tags in the html. They don't seem to complicate things and it is not my file, so I can't change it. But XPath Extractor doesn't accept it.
Tick Use Tidy box, it should help. If it doesn't - you will have to go for either Regular Expression Extractor or Boundary Extractor. Going forward if you add the code with the value you want to extract it will help a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.