How to upload a file from local machine.
My commands are:-
{
"Name": "filereadfromlocal-1",
"CreationDate": "2023-5-11",
"Commands": [
{
"Command": "open",
"Target": "https://www.ilovepdf.com/word_to_pdf",
"Value": "",
"Description": ""
},
{
"Command": "bringBrowserToForeground",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "waitForPageToLoad",
"Target": "6000",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "click // xpath=//*[@id=\"pickfiles\"]/span",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "xpath=//input",
"Value": "",
"Targets": [
"id=html5_1h0582bbqbinj0n1n5i1h8p1u9i4",
"xpath=//*[@id=\"html5_1h0582bbqbinj0n1n5i1h8p1u9i4\"]",
"xpath=//input[@id='html5_1h0582bbqbinj0n1n5i1h8p1u9i4']",
"xpath=//input",
"css=#html5_1h0582bbqbinj0n1n5i1h8p1u9i4"
],
"Description": ""
},
{
"Command": "store",
"Target": "60",
"Value": "TIME_OUT",
"Description": ""
},
{
"Command": "waitForPageToLoad",
"Target": "6000",
"Value": "",
"Description": ""
},
{
"Command": "type",
"Target": "id=pickfiles",
"Value": "C:\\Downloads\\SUMMER INTERNSHIP PROGRAMME AT TAX SOLUTIONS TAX CONSULTANCY ALAPPUZHA.docx",
"Targets": [
"linkText=Select WORD files",
"id=pickfiles",
"xpath=//*[@id=\"pickfiles\"]",
"xpath=//a[@id='pickfiles']",
"xpath=//div[4]/a",
"css=#pickfiles"
],
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ESC}",
"Value": "",
"Description": ""
},
{
"Command": "waitForPageToLoad",
"Target": "6000",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "id=processTaskTextBtn",
"Value": "",
"Targets": [
"id=processTaskTextBtn",
"xpath=//*[@id=\"processTaskTextBtn\"]",
"xpath=//span[@id='processTaskTextBtn']",
"xpath=//button/span",
"css=#processTaskTextBtn"
],
"Description": ""
}
]
}
But, error firing on file read command.
Please enlight me to solve this