Katalon Studio для загрузки более одного файла в одно поле ввода - PullRequest
1 голос
/ 12 июня 2019

На странице есть поле для ввода файла, к которому следует прикрепить более одного файла одновременно.

Я пытаюсь использовать [WebUI] Загрузить файл , но он не может обрабатывать два файла одновременно.

WebUI.uploadFile(findTestObject('Object Repository/validateFile/input_originalFile'), (d_directory.toString() + '\\') + file1, (d_directory.toString() + '\\') + file2)

Ответы [ 2 ]

2 голосов
/ 11 июля 2019
file1 = "C:\\path\\file.extension";
file2 = "C:\\path\\file.extension";
multipleFiles = file1 + "\n" + file2;

WebUI.uploadFile(findTestObject('yourTestObject'), multipleFiles)

Надеюсь, это поможет

также, этот список может помочь вам в будущем

Escape Sequence Description
\t  Insert a tab in the text at this point.
\b  Insert a backspace in the text at this point.
\n  Insert a newline in the text at this point.
\r  Insert a carriage return in the text at this point.
\f  Insert a formfeed in the text at this point.
1 голос
/ 13 июня 2019

проверить, является ли тип входного файла = "file".

...