Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set value of file input element #98

Open
GoogleCodeExporter opened this issue Jan 20, 2016 · 1 comment
Open

Cannot set value of file input element #98

GoogleCodeExporter opened this issue Jan 20, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant