astadtla / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

Cannot set value of file input element #98

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load page
2. Browser.AutomationTask_PerformEnterData("file", "path")
3. Value does not get set.

What are the OS and IE versions? XP SP3

What exceptions are thrown? If any, please copy and paste the exception dump. 
None

What is the expected output? What do you see instead?
Expect path to be set, box is empty.

Please use labels and text to provide additional information.

This is apparently a known problem with the Microsoft WebBrowser control, but 
this wrapper should find a way around it.

Original issue reported on code.google.com by alti...@gmail.com on 17 Sep 2010 at 1:17

GoogleCodeExporter commented 8 years ago
There is not way how to do this. IE itself prevents setting file field value 
other than by standard OpenFile dialog. API that IE exposes doesn't allow this. 
We solved this by clicking on field and setting file via Win32API directly to 
OpenFile dialog.

If you click on field, IE opens OpenFile dialog. Than you can find this dialog, 
get it's handle, fill it with required filename and confirm it.

Original comment by xkatu...@gmail.com on 16 Jun 2011 at 11:35