参考:https://docs.katalon.com/katalon-studio/docs/webui-upload-file.html#example-
适用范围:tag=input, type=file 控件的文件上传。
核心代码:
'Upload test-photo.png to input_browse'
WebUI.uploadFile(findTestObject('input_browse'), 'D:\test-photo.png')
关键点:
WebUI.uploadFile(to, file_path)第一个参数,即上传元素需要使用“type=file”的input对应的xpath。