Question
1
Replies
67
Views
Posted: July 2, 2020
Last activity: July 9, 2020
How to automate browsing of file in file explorer in chrome
I believe that you cannot interrogate file explorer when using chrome. My work around is using send keys to trigger the file explorer and paste the filename. The problem is there are times that the file explorer is not appearing after using sendkeys. I need to know how can i know if the file explorer element is already created, destroyed etc. Please help.
***Edited by Moderator Marissa to change type from Pega Academy to Product***
Here is a sample solution on how you might wait for the upload window to appear. Note that on my system, the locating of the Chrome windows takes about three seconds each run, so the timeout isn't 100% accurate (it might take a few seconds longer than your timeout). I am looking into a method of getting the exact Chrome window which should reduce the runtime of the script and allow it to catch the window much quicker, but for now, this works in a pinch. You will need to use a little C# (UI.Automation) to tweak this for your particular application. The Chrome window and dialog may require different conditions than those I have specified. You would use a tool like "Inspect Objects" from the Windows SDK to get these properties.