A tester is designing an automation using ScreenPlay and needs to create a workflow in which a user logs in to an application.
How should this interaction be implemented using ScreenPlay?
UiPath ScreenPlay provides agentic user interface automation capable of interpreting natural-language instructions and interacting with applications through AI-assisted execution.
Option A represents the most appropriate architecture for the scenario because it separates predictable authentication operations from subsequent agentic application interactions.
UiPath recommends a design principle described as maximally deterministic, minimally agentic. Conventional UI Automation activities should handle stable, well-defined operations, while ScreenPlay should be introduced where dynamic interfaces or complex interaction patterns justify agentic execution.
A login operation is generally predictable and commonly reused across multiple automation workflows. Implementing authentication in a separate workflow enables centralized credential handling, consistent error management, and easier maintenance.
Credentials should be retrieved from an appropriate secure credential store rather than embedded directly in prompts or source code. After successful authentication, the automation can invoke ScreenPlay to perform subsequent application interactions.
Option B unnecessarily delegates the entire workflow and credential retrieval to ScreenPlay. Option C does not establish the recommended separation of responsibilities. Option D introduces ReFramework as a mandatory architectural dependency, although ScreenPlay does not require it.
Official UiPath Reference(s): ScreenPlay User Guide --- Best practices; Where ScreenPlay belongs in an automation; Keeping the agentic surface small.