Hi,
I need to use VB to find the start (and end) postitions of a substring within a string. I've tried using standard VB InStr as follows:
but all I get is a Test Studio error stating "'InStr' is not declared".
Unfortunately I can't get the information using just Test Studio script because the screen that holds the data I need is a legacy screen and doesn't follow good practice in terms of the HTML. Long term it's on my radar to get that resolved, but for the present I can only capture the value of a whole Div into an extracted variable. That variable contains a lot of text, but I have to grab two dates that are included. I can't guarantee the format of the dates (depends on browser culture) so I need to extract them from the whole string.
Any ideas, please?
Thanks,
Nigel, Transition Computing.
I need to use VB to find the start (and end) postitions of a substring within a string. I've tried using standard VB InStr as follows:
Dim
justTheDates = wholeString.Substring(InStr(wholeString,
"Created On"
),InStr(wholeString,
"EditBack"
))
but all I get is a Test Studio error stating "'InStr' is not declared".
Unfortunately I can't get the information using just Test Studio script because the screen that holds the data I need is a legacy screen and doesn't follow good practice in terms of the HTML. Long term it's on my radar to get that resolved, but for the present I can only capture the value of a whole Div into an extracted variable. That variable contains a lot of text, but I have to grab two dates that are included. I can't guarantee the format of the dates (depends on browser culture) so I need to extract them from the whole string.
Any ideas, please?
Thanks,
Nigel, Transition Computing.