MarketplaceListingsSnippetSAP Click Execute And Check Result

SAP Click Execute And Check Result

Bronze Certified

Snippet

0 reviews

2

SAP Click Execute And Check Result

Bronze Certified

Snippet

0 reviews

2


Summary

Standardized sequence that will click execute button in SAP and handle all scenarios.

carouselImage0

Overview

Sequence Name = ClickExecuteAndCheckResult

Standardized sequence that will click execute button in SAP and handle all scenarios:

1. Success case
2. Fail case (where it will send Business Exception)
3. Timeout (where it will send System Exception) (Note that you need to provide the selectors to it to tell what is success and what is fail)

Success case includes:
1. Landing in success page (you can capture a selector in this page and pass it to the sequence)
2. Status bar showing success message (you can capture the message and pass to the sequence)

Fail case includes: (throws Business Exception)
1. Landing in fail page (you can capture a selector in this page and pass to the sequence)
2. Status bar showing message with type=Error (you don’t have to capture the message as any message with type=”Error” will be treated as Fail)
3. Status bar showing message with type NOT = Error but the message indicates an error. E.g. message type = "Success" but message = "No Data" (in this case you need to pass this message to the sequence)

Inputs

1. in_executeButtonSelector [String] (must have) - the selector of the execute button

1. in_statusBarSelector [String] (must have) - the selector of the status bar

2. in_successSelectorArray [Array of String] - array of selectors that indicate the execution is successful (e.g. element(s) in the success page) . Optional if in_successStatusTextArray isn't empty

3. in_successStatusTextArray [Array of String] - array of status bar messages indicating execution success. Optional if in_successSelectorArray isn't empty

4. in_failSelectorArray [Array of String] - array of selectors that indicate the execution has failed (e.g. element(s) in the fail/no data page) . Optional

5. in_failStatusTextArray [Array of String] - array of status bar messages indicating execution fail. Optional (Note - you don't have to put Error messages from the status bar here as the Robot will automatically throw Business Exception if it detects error status, just put non-error status bar messages where you need to throw a business exception, for example No Data status etc...)

6. in_timeoutMaxSeconds - If the robot doesn't find a success / fail indicator within the # seconds specified here, it will throw a System Exception. Optional (Defaulted to 30 seconds if blank)


Logic (Please see diagram)

While loop:
1. Get status bar message + Type
2. If Status bar Type = "E" (Error), throw business exception
3. For Each element in in_failStatusTextArray, check if status bar message contains the element, if it does throw business exception
4. For Each element in in_successStatusTextArray, check if status bar message contains the element, if it does exit loop
5. For Each element in in_successSelectorArray, check if one of them exists, if it does exit loop
6. For Each element in in_failSelectorArray, check if one of them exists, if it does throw business exception
7. If the robot doesn't find a success / fail indicator within in_timeoutMaxSeconds, it will throw a System Exception

Benefits


Published: 2021-04-13T07:09:45+00:00 | Updated: 2021-04-13T07:09:45+00:00

Jack Chan
RPA Developer

License

MIT


Code Language

Visual Basic


Tags

sap
SAP Execute

Compatibility

UiPath Studio 2020.10.3 and above


Dependencies

UiPath.UIAutomation.Activities


Documentation


Similar Listings