I have seen a few questions here on stack that relate to this topic and like the other questions the responses seem to always include RC/WD solutions. this is for SELENIUM IDE, not the WD/RC implementations.
I realize that we just need to set the value of the element that stores the file path, but I am seeing conflicting ways of doing it.
My element that stores the string of the file path looks like this under the inspector:
input type="file" name="StdConditionsFile" id="pdfApp"
If I get the Xpath of the element it looks like this:
//*[@id="pdfApp"]
I am using the following code to assign the file.path:
- Command: type
- Target: id=idOfFileInput
- Value: /full/path/to/uploadfile
But I am having no luck. I tried using the name, xpath and id of the element but the file.path is never assigned.
Update: I am finding some progress but it might be misleading as to if I can actually do this. Instead of using 'type' as the command I looked for another alternate and found 'setElementAttribute'. If I use that command with either the Id, name or XPath of the upload.element I can see that I am actually setting the value, however there is a catch to this.
After I run any of those 3 commands I see this in the inspector:
input name="StdConditionsFile" id="pdfApp" value="C:\full\path\of\file\filename.pdf" style="" type="file"
Where it is like this before running the commands
input name="StdConditionsFile" id="pdfApp" style="" type="file"
but when you look at the DOM properties, the attribute called 'value' is "" or null.
Anyone actually have any success with this?