Support Article
Unable to click the File Browse control
SA-105764
Summary
Unable to click the File Browse control. This occurs while using the Universal Web adapter.
Error Messages
Not Applicable
Steps to Reproduce
- Create a control for button element where input type = "file"(choose file)
- Invoke the PerformClick method on the control created
Root Cause
It is a limitation with the Chrome browser. The user is not allowed to click the Choose File button programmatically without user activation on the button.
Resolution
Perform the following local-change:
- Create windowsAdapter for chrome.exe
- Interrogate the frame using the Windows interrogation frame
- Invoke the Focus method on the choose file control
- Invoke the Sendkeys method on .Interrogated frame
Published April 15, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.