|
Rank: Newbie Groups: Member
Joined: 3/21/2014 Posts: 6
|
Hello,
Since there is no other solution to automate the "browse" button in the forms over a file field (file upload field), it would be perfect if this control was able to do it. Any user of EO.Webbrowser has any idea how this can be implemented by the developers?
I vote for a hook to replace the path (maybe thru DOM objects?)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
Thank you very much for your feedback. Yes. That's one of the idea we are considering. Another idea is to provide a unified SetFieldValue method on the WebView class that can be used on all type of fields. In either way we would have to implement something on our end since this does not exist in standard DOM/JavaScript interface.
|
|
Rank: Advanced Member Groups: Member
Joined: 12/9/2014 Posts: 79
|
Any news on this?
I am automating a form with file upload.
Its possible to automate with javascript? Giving the path to the Local file or something similar. Its possible to automate with post? If I create a Request object and add some "Post" values(the other fields of form), how i can add or send a local file too? How about a "stream", if the file content is obtained from code?
Thank you very much
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
Hi,
It is not possible to automate file upload with JavaScript because that would be a serious security issue (people would be able to steal files from end user's computer as soon as they can lure people to visit their website). However with EO.WebBrowser it is possible for you to create a Request object and add post values, including file post values directly. You will need to follow these steps:
1. Use "new Request(url)" to create a new Request object; 2. Use "new PostDataItem(fileName)" to create a file post item, then add it to the request object's PostData collection; 3. Call WebView.LoadRequest to load the request;
Hope this helps. Please feel free to let us know if you still have any questions.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/9/2014 Posts: 79
|
Ok, its good news!
I'll give a try.
Thanks!
|
|