web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Citrix Automation via ...
Power Automate
Suggested Answer

Citrix Automation via PAD Agent – 'Parent Screen Not Found' & Selector Instability

(2) ShareShare
ReportReport
Posted on by 4

I'm automating a Citrix-hosted application using Power Automate Desktop (PAD) across two virtual machines and running into selector instability.
My Setup:
VM A: Where I design and orchestrate desktop flows
VM B: Runs the Citrix application (hosted app I want to automate)
Power Automate Agent for virtual machines is installed and connected on VM B
Since Citrix doesn't expose UI elements directly, I'm using image-based and keyboard automation in the PAD flow triggered on VM B
Issue:
Every time I run the flow, I get:
"Couldn't test the selector, the parent screen was not found."
This happens even when interacting with File Explorer, Downloads window, or standard Windows dialogs
It only works if I re-capture selectors every time, which isn’t reliable
Also facing issues launching browsers in VM B for any post-processing
Selectors break even with minor changes in screen resolution or window state
What I’ve Tried:
Set fixed resolution and scaling in VM B
Added delays, image-based clicks, and keyboard shortcuts
PAD agent is installed correctly and machine is connected
Looking For:
A stable method to automate Citrix applications using PAD and PAD Agent
Best practices for image/keyboard automation within Citrix windows
Ways to avoid constant re-capturing of selectors or prevent breakage
Alternatives or enhancements that could improve reliability of this setup

I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
     

    You're facing a common challenge when automating Citrix-hosted applications using Power Automate Desktop (PAD) — selector instability and resolution sensitivity. Here's a comprehensive guide to help stabilize your automation and improve reliability:


     Understanding the Challenge

    Citrix applications render UI elements as bitmaps, not native Windows controls. This means:

    • Selectors often fail because PAD can't "see" the UI elements.
    • Image-based automation becomes the fallback, but it's sensitive to resolution, scaling, and window state.

    🛠️ Best Practices for Stable Citrix Automation

    1. Use Image and OCR Automation Strategically

    • Use high-quality, consistent screenshots for image matching.
    • Prefer OCR-based text recognition for dynamic elements (e.g., buttons, labels).
    • Use relative coordinates when clicking near recognized text.

    2. Standardize VM B Environment

    • Set fixed resolution (e.g., 1920x1080) and 100% scaling.
    • Disable auto-scaling and DPI awareness in Citrix settings.
    • Ensure the Citrix app always opens in the same position and size.

    3. Avoid Selectors for Citrix UI

    • Use selectors only for native Windows dialogs (e.g., File Explorer).
    • For Citrix windows, rely on image-based actions and keyboard shortcuts.

    4. Use Wait and Retry Logic

    • Add “Wait for image/text” actions before clicking.
    • Use “Retry” loops to handle slow Citrix rendering.

    5. Launch Browsers via Command Line

    If launching browsers fails on VM B:

    Start-Process "C:\Program Files\Google\Chrome\Application\chrome.exe" "https://your-url.com"

    Use PAD’s “Run application” action with full path and arguments.


    🔄 Alternative Approaches

     Use Citrix Virtual Channel SDK

    If you have control over the Citrix environment, consider using the Citrix Virtual Channel SDK to expose more automation-friendly interfaces.

     Hybrid Automation

    Split the flow:

    • Use PAD on VM A for orchestration.
    • Use PowerShell or remote scripts on VM B for launching apps or post-processing.

    🧪 Debugging Tips

    • Use PAD’s “Take Screenshot” action to verify what VM B sees.
    • Log all actions and failures to a file for traceability.
    • Test flows with minimal UI changes to isolate instability causes.

     

     
    🏷️ Tag me if you have any further questions or if the issue persists.
    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard