startIndex cannot be larger than length of string

From upload confirmation box I am trying to capture the ID

Output variable declare UploadConfirmation of Type String(this is a GetText activity)
But while trying to extract that id I am getting an error
Assign out_UploadID: startIndex cannot be larger than length of string.
Parameter name: startIndex

if I try to print value of UploadConfirmation is
Upload Conformation Message from webpage
here message text and id is missing, something wrong
this is the msg details:

“message”: “Upload Conformation Message from webpage”,
“level”: “Information”,
“logType”: “User”,
“timeStamp”: “20:30:50”,
“processVersion”: “1.0.6846.21553”,
“jobId”: “42a0c225-c9ba-4b2b-bf30-993e58470176”,
“robotName”: “FirstRobot”,
“machineId”: 7184,
“logF_BusinessProcessName”: “GenerateYearlyReportForVendor”

So the error message you are receiving is due to the length of your string being incorrect for what you are trying to extract.

If you are using split or substring for example, and your string is 10 chars long but you are trying to access the start index at 11 it will error.

Yes. Value of UploadConfirmation is “Message from webpage”, which is the title of the dialog box. What should I do to achieve this. How to get the complete text of the dialog box and function to split it.

Do you have a screenshot of the pop up you are trying to get text from?

Try the GetFullText activity or play around with the selector to try and get the part of the confirmation box with the text.

I think “Report was uploaded - confirmation id is” is going to be fixed.
So one option would be to use Replace:
String.Replace(StringName,“Report was uploaded - confirmation id is”,“”).Trim
StringName will be the entrie text with the id.

Yes done. Everything working good. Thank for your support and guidance.

So I have two set of files: One for Dispatcher and another for Performer.
How can I upload in the Academy site. Compress 2 different file OR make it a single file.

1 Like

Make them into one Zip file and upload it.

If the above solution helped in resolving your problem please can you mark it as a solution.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.