Question
TATA
MX
Last activity: 19 Jul 2022 10:41 EDT
file chooser dialog can only be shown with a user activation
Good Day,
I’m work in a bot that interact with a web page. I need do click in an element that open the windows file explorer and I load file .zip.
I’m send javascript from Pega but It don’t execute the event click in the element. I did test from console and the script execute rigth. When I send script from Pega it returns the following “file chooser dialog can only be shown with a user activation”. Please, you can help me.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
@NiyiredC I have always found that using SendKeys to trigger those controls is the easiest. I do not have a JavaScript that I am aware of that works to trigger them since these types of controls generally prevent scripts from triggering them. Here is an example of SendKeys.
TATA
MX
Hello @ThomasSasnett, Thank a lot for you answer, I reviewed your project, I see that you send "keystroke",but I dont have this option in my version. My version is 8.0.2025.0. exist other solution or how can I found "SENDKEYS" in my version?.
Pegasystems Inc.
US
@NiyiredC You are correct. I don't believe that was available until more recently. You should consider upgrading to a later version (I would suggest the latest build of 19.1).
Updated: 30 Apr 2022 15:23 EDT
Altisource
IN
@ThomasSasnett But the SendKeys won't work when the BOT is running on a Windows VM and it is locked. It needs the Windows VM or the session to be live on screen or the VM to be unlocked. Is there any other alternative for this scenario?
Altisource
IN
@ThomasSasnett Our ask is to run it as an unattended BOT on a VM which will perform these actions. We have observed that the SendKeys wont work as the VM will eventually get locked due to organization Infosec policies, Is there any other alternative?
Pegasystems Inc.
US
@SujithN0 Not that I am aware. If you are automating a task as a user and that task cannot be done if the workstation is locked, then you can run that task as an attended automation triggered by a user or setup your unattended VMs to remain unlocked (or run some process on them to keep them from locking; assuming you'd get permission to do so).
David Taliga
AT
Hello ThomasSasnett, Please is there any solution for above issue ? We face the very same situation currently, after microsoft stopped supporting Internet Explorer, we had to move all our robot solutions to Chrome, we run 3 unattended bots in 3 different VMs, where currently we need to stay logged in because the only option is to use "sendkeys" , after we disconnect from VMs, all robots stop working, these robots do work compared to 2FTE everyday.
Thank you very much
Pegasystems Inc.
US
@DavidTSendKeys will not work on a locked machine likely forever. The resolution for this problem is to ensure that if you have an unattended process, you run that process on a VM that is unlocked and remains so during the duration of the automation. If that is not possible, then you can run the automation as an attended automation and have a user preventing the screen from being locked while it is running.