Need help - File Upload

Dear Community,

I’m working a few days on Ui.Vision, but now I dont know how to carry on.
I have a folder, there are a lot of XML-Files in it. This XML-Files have to uploaded in a website. My Code works perfectly, but only If I fill in ONE file, but the script has to search in the folder and take all XML-Files in this folder.

{
“Name”: “sdasd”,
“CreationDate”: “2021-12-14”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.kba-online.de/ivicoc_prod/intercoc_webapp/upload.html”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=file”,
“Value”: “”,
“Targets”: [
“id=file”,
“name=file”,
“xpath=//[@id=“file”]",
“xpath=//input[@id=‘file’]”,
“xpath=//p/input”,
“css=#file”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=file”,
“Value”: “C:\Program Files (x86)\Fuhrpark\FPKFZul\Daten_MG\XML\IVICoC\LSJE24097NS016194_202112_10141755_307.xml”,
“Targets”: [
“id=file”,
“name=file”,
"xpath=//
[@id=“file”]”,
“xpath=//input[@id=‘file’]”,
“xpath=//p/input”,
“css=#file”
],
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “id=btnHochladen”,
“Value”: “”,
“Targets”: [
“id=btnHochladen”,
“name=btnHochladen”,
“xpath=//[@id=“btnHochladen”]",
“xpath=//input[@id=‘btnHochladen’]”,
“xpath=//input[2]”,
“css=#btnHochladen”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“dialog”]/p”,
“Value”: “”,
“Targets”: [
“xpath=//[@id=“dialog”]/p",
“xpath=//div[2]/div[2]/p”,
“css=#dialog > p:nth-child(1)”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=/html/body/div[3]”,
“Value”: “”,
“Targets”: [
“xpath=/html/body/div[3]”,
“xpath=//body/div[3]”,
“css=body > div.ui-widget-overlay.ui-front”
],
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “name=btnStart”,
“Value”: “”,
“Targets”: [
“name=btnStart”,
"xpath=//
[@id=“dialog”]/form/input[2]”,
“xpath=//input[@name=‘btnStart’]”,
“xpath=//form/input[2]”,
“css=#dialog > form > input.submit”
],
“Description”: “”
},
{
“Command”: “”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}

How can I submit all files in a folder and after upload move them to another folder? The second problem is, If one file is uploaded, script has to restart.

This are my two problems. Can anybody help me?

Thanks and best regards from germany.

Jonas

Hi, see here:

For example, you can make a small powershell script that lists all files in a folder. Then store these in a CSV file, and the RPA software reads the CSV file.