We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Good day,
Please see the image attached, the text string "Event id: 2172 Status: Work in progress" appears in the top right corner. It is a long string found within CSS selector,
#ismheader > header > div.event-message
How would you save "2172" for later use? The goal here is to save the Event ID number (2172) and retrieve its details in a separate keyword test.
Thank you.
Regards,
Arlene
In your case, you can use Set Variable Value. Pick your variable and then use Code Expression to get the string with your own InputString, StartPosition, and Length.
This should be of some help:
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/substring.html
You want to start right after the first colon and take the next four characters (or whatever is appropriate) and store them in your variable.
I see, thank you. One more question:
How would you use this aqString method in a Keyword test?
Thanks,
Arlene
In your case, you can use Set Variable Value. Pick your variable and then use Code Expression to get the string with your own InputString, StartPosition, and Length.