Need help in with file explorer picker

Hi Team,

I am using XClick & Xtype to load the file via windows file explorer as:
{
“Command”: “XClick”,
“Target”: “xpath=//button[text()=‘Upload Photo’]”,
“Value”: “”,
“Targets”: [
“name=document”,
“xpath=//*[@id="contact-form"]/div/div[8]/div[6]/div/div[2]/input”,
“xpath=//input[@name=‘document’]”,
“xpath=//div[2]/input”,
“css=#contact-form > div > div:nth-child(8) > div:nth-child(6) > div > div.upload-btn-wrapper > input”
],
“Description”: “”
},

{
“Command”: “XType”,
“Target”: “E:\Bhanu Docs\My Passport Size Pic Compressed ${KEY_ENTER}”,
“Value”: “”,
“Description”: “”
},

Now here issue is whenever I do XClick then there are some delays sometimes for windows to open the fileExplorer. How to handle this ???

Hi

You can add a pause command ti apply a delay after Xclick

This is for 5 seconds of pause but you can custom the value

  {
      "Command": "pause",
      "Target": "5000",
      "Value": "",
      "Description": ""
    },

no pause is hardcoded command & shouldn’t use.

Tried with visualSearch as well but no luck. It always returning 0 & going to infinite loop

{
“Name”: “TT-1”,
“CreationDate”: “2024-2-12”,
“Commands”: [
{
“Command”: “XClick”,
“Target”: “xpath=//button[text()=‘Upload Photo’]”,
“Value”: “”,
“Targets”: [
“name=document”,
“xpath=//[@id="contact-form"]/div/div[8]/div[6]/div/div[2]/input",
“xpath=//input[@name=‘document’]”,
“xpath=//div[2]/input”,
“css=#contact-form > div > div:nth-child(8) > div:nth-child(6) > div > div.upload-btn-wrapper > input”
],
“Description”: “”
},
{
“Command”: “XDesktopAutomation”,
“Target”: “true”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “do”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “visualSearch”,
“Target”: “explorer.png”,
“Value”: “found”,
“Description”: “”
},
{
“Command”: “repeatIf”,
“Target”: “${found} == 0”,
“Value”: “found”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Finally waited ${found}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “E:\Bhanu Docs\My Passport Size Pic Compressed ${KEY_ENTER}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “xpath=//button[text()=‘Upload ID Proof’]”,
“Value”: “”,
“Targets”: [
“name=document”,
"xpath=//
[@id="contact-form"]/div/div[8]/div[6]/div/div[2]/input”,
“xpath=//input[@name=‘document’]”,
“xpath=//div[2]/input”,
“css=#contact-form > div > div:nth-child(8) > div:nth-child(6) > div > div.upload-btn-wrapper > input”
],
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “E:\Bhanu Docs\VoterId Compressed ${KEY_ENTER}”,
“Value”: “”,
“Description”: “”
}
]
}

I am able to achieve this with repeatif condition