Substring OutofBounds Exception


While automating text operations, I use the Substring Option for getting a certain text from input and sometimes it throws “IndexOutOfBoundsException”.

The input is like : A-1234567|4500.3698.4567.22331 and i wanted to extract only the A-1234567 using the Substring option. I use Substring[1,9] to get those value and store in a string.

Have attached the snapshot for reference. Kindly guide me where i went wrong!!

It looks like the string, from which you are trying to get the substring, is empty.
You can check in the execution-result.log is there is any data saved in it.

Yes the string was empty once i re-run testing it… it worked fine… Thank you!!

1 Like