Как загрузить файл в Каталон - PullRequest
0 голосов
/ 13 июня 2019

Итак, я хочу, чтобы автоматизированный тестовый случай нашел файл и загрузил его. Это то, что я нашел в своем исследовании, но не повезло с ним.

WebUI.openBrowser('C:\\\\Users\\\\User\\\\Desktop\\\\Katalon Articles\\\\File Upload\\\\UploadFile.html')

'Maximize the window\r\n'
WebUI.maximizeWindow()

'Uploading the File using Send Keys method by passing the File path'
WebUI.sendKeys(findTestObject('Upload File'), 'C:\\\\Users\\\\Public\\\\Pictures\\\\Sample Pictures\\\\Desert.jpg')

'Capturing the file name after upload and storing it in a variable'
FilePath = WebUI.getAttribute(findTestObject('Upload File'), 'value')

'Verifying the Actual path and Expected path of file'
WebUI.verifyMatch(FilePath, 'C:\\fakepath\\Desert.jpg', false)
...