Micro Focus QTP (UFT) Forums

Full Version: File Chooser on Chrome doesn't work - UFT 15.0.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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?