Micro Focus QTP (UFT) Forums
File Chooser on Chrome doesn't work - UFT 15.0.1 - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: File Chooser on Chrome doesn't work - UFT 15.0.1 (/Thread-File-Chooser-on-Chrome-doesn-t-work-UFT-15-0-1)



File Chooser on Chrome doesn't work - UFT 15.0.1 - Nenna Rosa - 10-26-2020

I'm trying to record a file upload via a File Chooser in Chrome browser.
When i run the recording Chrome blocks the File Chooser dialog whit this error: File chooser dialog can only be shown with a user activation.


Code:
Browser("something").Page("myPage").WebButton("CHOOSE FILE").Click
Window("Google Chrome").Dialog("Open").WinEdit("Nome file:").Click 58, 6, micRightBtn
Window("Google Chrome").Dialog("Open").WinEdit("Nome file:").WinMenu("ContextMenu").Select "Paste"
Window("Google Chrome").Dialog("Open").WinButton("Open").Click
Browser("something").Page("myPage").WebFile("file_2").Set "myFile.xlsx"


How can I avoid this problem?


RE: File Chooser on Chrome doesn't work - UFT 15.0.1 - Ankur - 10-31-2020

There are several threads on this topic in this forum. Here is a blog article -

What to do when UFT is unable to identify upload buttons?