Win 10 PC
FileAccess XModule Installed (v1.0.12)
DesktopAutomation XModule Installed (v1.0.42)
Screen Capture XModule Installed (v1.3.6)
I am trying to upload multiple files from my local drive to a web portal.
The recorder works, but the name/s of the files change from week to week.
I can use a wildcard or possibly do read from CSV, however, I am trying to avoid having to manage another list or have to add/delete from the script when things change.
So, I’m trying to upload the first file, then select that file and use Xtype Key_Down, so on and so forth, wrapped into possibly a Do…While loop to upload the remaining files.
It succeeds up until the xType Key_Down command. The logs show the command completes however in the upload window the next file down is not selected.
{
“Name”: “File Upload”,
“CreationDate”: “2021-10-25”,
“Commands”: [
{
“Command”: “bringBrowserToForeground”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “open”,
“Target”: “Website”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=files”,
“Value”: “”,
“Targets”: [
“id=files”,
“name=files”,
“xpath=//[@id=“files”]",
“xpath=//input[@id=‘files’]”,
“xpath=//input”,
“css=#files”
],
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “Cdrive_dpi_96.png”,
“Value”: “”,
“Targets”: [
“id=files”,
“name=files”,
"xpath=//[@id=“files”]”,
“xpath=//input[@id=‘files’]”,
“xpath=//input”,
“css=#files”
],
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “Folder_dpi_96.png”,
“Value”: “#doubleclick”,
“Targets”: [
“id=files”,
“name=files”,
“xpath=//[@id=“files”]",
“xpath=//input[@id=‘files’]”,
“xpath=//input”,
“css=#files”
],
“Description”: “”
},
{
“Command”: “XClickRelative”,
“Target”: “FirstFileUpload_dpi_96.png”,
“Value”: “#doubleclick”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=files”,
“Value”: “”,
“Targets”: [
“id=files”,
“name=files”,
"xpath=//[@id=“files”]”,
“xpath=//input[@id=‘files’]”,
“xpath=//input”,
“css=#files”
],
“Description”: “”
},
{
“Command”: “XClickRelative”,
“Target”: “FirstFileUpload_dpi_96.png”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${KEY_DOWN}”,
“Value”: “”,
“Description”: “”
}