Question
Sun Life Financial
PH
Last activity: 12 Jul 2021 22:39 EDT
Website Requires Send Key Action to enable File Upload window
We are conducting a proof of concept for automating a website. On this website, the user clicks a button that opens a file browser dialog for user to select a file to upload. Using Pega Robotics Studio 19.1.71, we tried automating the website using Universal Web Adapter in Chrome and Edge.
However, the automation is not able to trigger the file browser dialog to open using perform click and onchange raise event, only with a sendkey method. Is there another way to trigger the filebrowser without using send keys? The machine where robot will run will be locked, so the sendkey method will not work.
Attached is the screenshot for the File Upload website, and the events triggered when using perform click and onchange raise event.
@MayAnnTenorio
I tested on the W3Schools website and my basic tricks for triggering the JavaScript events for the control did not work to get it to show the dialog. Before I went any further though, I tested to see what happens if the dialog were already present and the screen was locked. Would I be able to even handle that window using my normal methods? Automating that dialog is usually done via a UI Automation script in C# (at least that is the way I prefer to do it). UI Automation doesn't work when the screen is locked as it cannot execute clicks on controls in a locked state.
If you used a Windows adapter with a StartMethod of MonitorAll to interrogate the Edge browser controls, then it would still require a SendKeys to click the Open button. I also wouldn't suggest this approach, but it does allow those controls to be interrogated.