07-07-2008, 12:43 AM
Hi,
I am trying to set a value to an INPUT element of type=file, but it fails as its a read only property.
ele.value = "C:\abc.xml"
Note:- ele is the element I read using DOM Methods..
Using QTP "WebFile" method "Set", am able to set this value.
How is this designed!
____
Below is the line from page source of a web page:-
Using DOM I read this element & stored in a variable named ele.
ele.value = "C:\abc.txt"
This Fails!
But I am able to populate from QTP as below simple as below:-
Now:-
I wanna populate this field using DOM or any other Object Model but not using QTP given WebFile/WebEdit Methods.
This should be possible in someway because QTP WebFile Method "Set" is also developed based on some library.
Note:-
value property of this element(INPUT Tag with type=file) is read-only. (http://www.w3schools.com/htmldom/dom_obj_fileupload.asp)
Can anyone please help me to resolve this issue.
For now I am managing with sendkeys method, which I want to remove.
Thanks,
Bapu
I am trying to set a value to an INPUT element of type=file, but it fails as its a read only property.
ele.value = "C:\abc.xml"
Note:- ele is the element I read using DOM Methods..
Using QTP "WebFile" method "Set", am able to set this value.
How is this designed!
____
Below is the line from page source of a web page:-
Code:
<input id="uploadFile" type="file" name='uiBean.evt.fullPath' value="" size="70" />
Using DOM I read this element & stored in a variable named ele.
ele.value = "C:\abc.txt"
This Fails!
But I am able to populate from QTP as below simple as below:-
Code:
Browser("dddd").Page("sddd").WebFile("UploadFile").Set "C:\abc.txt"
Now:-
I wanna populate this field using DOM or any other Object Model but not using QTP given WebFile/WebEdit Methods.
This should be possible in someway because QTP WebFile Method "Set" is also developed based on some library.
Note:-
value property of this element(INPUT Tag with type=file) is read-only. (http://www.w3schools.com/htmldom/dom_obj_fileupload.asp)
Can anyone please help me to resolve this issue.
For now I am managing with sendkeys method, which I want to remove.
Thanks,
Bapu