When I run my bot in unattended mode on a VM, I open pdf file as part of process.
The pdf does not open in foreground.
I have tried
Activate window
Attach window + minimize & maximise
Attach window + Maximise
Attach window + Hot Key (Windows + Up)
Left mouse Click - works sometimes on VM (not always), many times it make a right click instead of left. Click works perfectly on my machine every time but not on VM.
Using Attach Window followed by an Activate usually works, another option is to use the Invoke method and call the âBringToForegroundâ method (which is the same as Activate activity)
As for the selector please validate on that VM the process details for Acrobat, in some cases, it can be app=âacrord32.exeâ depending on the product version. The title attribute can be fine-tuned as well
⌠title='Order*Adobe Acrobat*' />
I tried Activate + Attach over the weekend. It did not gave any issue in testing. I have deployed it, will check over next 1 week if there is any issue.
If it doesnât work, will try Attach + Activate (other way in sequence)
Studio version on my machine - 2019.4.4
Studio version on VM - 2019.10.4
When I run the bot from my machine through Studio - it runs fine.
I copied my development files on botâs VM - ran the bot through Studio - it works fine.
If I release the bot from VMâs Studio to Orchaestrator and ran the bot on VM - it works fine.
However if I release the bot from my machine and ran the bot on VM - it doesnât work.
Is this Studio version possible cause for this discrepancy ?
@sushildarveshi:
When you say youâre running Unattended mode, I was under the impression that you have an Unattended âRobotâ running the nuget package on the VM, not as XAML files.
So do you have 2 Studios - one on your machine and the other one on VM?
Ensure the following:
If you have Studio and a Robot then make sure they are the same version.
Also make sure the Orchestrator version is also compatible. Here is the link to Compatibility Matrix
Whether you tried to open the pdf file using powershell command, @sushildarveshi
Check the below command,
âStart-Process ((Resolve-Path âFullFilePathâ).Path)â
same result
works fine when bot is ran from Studio of my machine or Studio of VM - pdf opened in foreground.
But when I release the project to Orchestrator from my machine, and run it on VM via robot tray / Orchaestrator schedule job - pdf doesnt open in foreground.