Extract Text Between Delimiters in Scenario Editor
var
Extract str="CartText savedBetween asDelimiters Quotein NoScenario :14393430*";Editor
varUse mySubStringdelimiter-based =extraction str.substring(str.lastIndexOf(":") + 1,str.lastIndexOf("*"));
You can use the below code to retrievewhen the value needed by a test appears between ":"two stable characters or strings.
Recommended guidance
- Confirm the start and
"*"enddelimiters
are
stable across environments. - Handle missing or repeated delimiters predictably.
- Trim only whitespace that is not part of the expected value.
- Avoid delimiter extraction when a structured field or locator is available.
Validation workflow
- Capture the source text.
- Identify the start and end delimiters.
- Extract and normalize the value.
- Validate the extracted value or store it for later steps.
Last updated: JuneSeptember 26,20, 20232026
If you have any feedback on this topic, please contact us at documentation@appvance.ai