chooseFile

chooseFile(filepath)

This function can be used to automate the interaction with the file dialog opened by the browser when wanting to upload a file. The filepath needs to be the absolute path to an existing file that should be selected in the dialog.

This function can be useful in cases where the file dialog is not opened through a standard HTML file field, but rather using some customized controls for managing the uploaded files. The interaction with those controls can usually be recorded normally and then a chooseFile line can be added to the script to automate the selection of the file in the file dialog.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results