Posted: 20 Mar 2019 10:27 EDT Last activity: 21 Mar 2019 17:16 EDT
Switch vs Signal components
We have a scenario in a WEB application that we don't know what is the best approach to address it. After calling an external service, we need to go automatically to a different screen depending on the response. We are discussing a lot and we have two options, but we don't agree any of them:
From documentation: "Signals can be used in all solutions to control execution flow when multiple threads occur during the course of an automation"
I think this is not the case, because we are just moving to different screens, so we really have only one thread, right?
From the documentation: "The Switch component allows conditional logic for the execution of automation events. For example, use this Switch to trigger specific events based on the index of the toolbar button selected"
I prefer this solution, we just need to choose the next screen after a condition, in this case the service response, right?
You are most likely looking for the Switch component here. I'd imagine that the page responds by a varying text and you need a button press to go to the next screen. You can verify the text using the switch component, find if it matches your case, and then press a button depending on the case. How you would set that up can be seen here:
Thanks for your answer! I will try to clarify, we have not implemented anything yet.. we are discussing how to do it..
Our automation is going to perform a click event in a button of the Web application. That button calls a web service that can return an error (the error is displayed in the same screen) or a successful code, and depending on that code the Web application navigates to a new screen or another. That is done by the Web app automatically, but we need to know in which screen we are after the action is performed.
Writing and explaining the scenario this way, maybe the right answer is the Signal component... I really don't know.. I'm a mess! :)