While using Desktop PiP, UI Automation giving error:
This action can only be performed when running in the main desktop
@sishiramishra
UiPath’s UI Automation activities are designed to work within the main desktop context and may not directly support automation within a PiP window or other separate desktop contexts.
However, you can try the following alternative approaches:
- Move the PiP window to the main desktop: If possible, try moving the PiP window to the main desktop before performing UI automation actions. This can be done manually by dragging the window or programmatically using platform-specific techniques.
- Use image-based automation: Instead of relying on traditional UI Automation activities, you can use image-based automation techniques. Capture screenshots of the PiP window or specific elements within it and use activities like “Find Image” or “Click Image” to interact with them. This approach allows you to automate based on the visual appearance of the PiP window rather than relying on direct UI element interaction.
- Explore alternative automation techniques: Depending on the specific requirements and capabilities of the application you’re automating, there may be alternative methods of interacting with the PiP window. For example, if the application provides an API or command-line interface, you can automate actions through those interfaces instead of relying on UI interaction.
How can you drag a window from PiP Virtual Desktop to main desktop? With new PiP Desktop version, you can see both screens at the same time.
I am able to fix this issue by changing the input mode but still curious to know how this can work where no flexibility to change the input mode.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.