Question
Ford Motor Company
US
Last activity: 4 Mar 2022 12:42 EST
Pega Robot Studio - Universal WebAdapter Chrome Browser file download Windows "SaveAs"
I am interrogating a webpage with a control link that when clicked will download a file.
It will popup with a Windows "SaveAs" which I cannot interrogate (cannot drag/drop to target).
I did set HookChildProcesses=true
What are the steps to interrogate in this situation?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 27 Sep 2021 12:32 EDT
Ford Motor Company
US
The solution was to create a windows adapter for chrome.exe (with HookChildProcesses=true, startMethod=MonitorAll), navigate to the window popup, and then interrogate with the windows adapter.
-
Nagaraju Nalla
Ford Motor Company
IN
@RochelleT we are using ui automation script instead of using windows adapter
Pegasystems Inc.
US
@RochelleT This will certainly work. It isn't advised for an attended solution, but for unattended, this should work fine. If you'd like to do this for attended or without the adapter, then I can provide a post where the script is posted.
Ford Motor Company
US
This is for unattended solution. However, I would like the best way to implement.
If a script is a better approach, yes please attach the link of the post as I tried to search this down.
Pegasystems Inc.
US
@RochelleT The link to the post is below. I prefer to use the script since it works well, however if your solution is working, it will accomplish the same thing.
https://collaborate.pega.com/question/unable-interrogate-edge-browser-files-selection-window
Ford Motor Company
US
We've upgraded to 19.1.99 in effort to not use chrome.exe. This is a unattended solution.
With this upgrade, I'm now able to interrogated the "SaveAs", and locally all is working for me as expected.
The solution is to change filename to be a different path/filename than the default. Again, this works locally for me.
However, when deploying to a VDI, it will not pick-up the filename (it reverts it to the default). I tried adding pauses, I tried to sendkeys {TAB}, {ENTER} instead of the Save button. Nothing works.
Why would there be different behavior locally vs VDI? What is the recommended approach?
Pegasystems Inc.
US
@RochelleTIs the VDI running unlocked? I know these dialogs may not appear if the screen is locked or if a screensaver is running. That is probably the most likely cause I would think.
Ford Motor Company
US
@ThomasSasnett No, it's not locked. The SaveAs dialog appears, the filename changes, but on SendKeys{ENTER} or click of Save button, it saves the as the default.
Pegasystems Inc.
US
@RochelleT That is interesting and not something that I have heard of. I think this might be best served by gaining access to your machine. You'll need to open a support request to have someone from our support team look at this with you. If you do, please record the support case number here so we can track the resolution.
Updated: 4 Mar 2022 12:38 EST
Ford Motor Company
US
This is to help others who may want "SaveAs" Dialog functionality...
I found a different way to accomplish my requirement. I now avoid SaveAs dialog, by disabling Google Chrome Settings "download" (which is default anyway). I allow the automatic download and do a fileUtils file move (rename) to target destination instead. This does require added sufficient amount of time (pauses) before/after move, otherwise you could incur "Failed - Download error". However even with that error, the files downloaded successfully. Adding more pause time, prevents that error.
... Getting back to "SaveAs" dialog. This is what I'm told, but have not tested (I did not want to revert code back). The txtFile_name of the "SaveAs" needs the value (path/filename) passed as SendKey, Focus=true. (which is what I did try)
The solution... What I did not try... it needs a custom noSleep component with PreventPowerSave/Shutdown. Even if it does not appear to be sleeping. I'm told any "SendKey" causes the need for the noSleep component.
-
Thomas Sasnett
Pegasystems Inc.
US
@RochelleT This is great advice for an unattended bot. If possible, you always want to eliminate steps to be automated (less waiting for things, less steps in general). For Chrome or Edge, yes, you can have files download directly which would make this much easier.