Skip Menu |

This queue is for tickets about the Win32-IE-Mechanize CPAN distribution.

Report information
The Basics
Id: 15277
Status: stalled
Priority: 0/
Queue: Win32-IE-Mechanize

People
Owner: abeltje [...] cpan.org
Requestors: rogerhill [...] cwgsy.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.009
Fixed in: (no value)



Subject: Cannot set value of an input field of type file
Running a perl test scrip using Win32::IE::Mechanize to test a web page. I find that I cannot set the value from the perl script of an <imput type="file"> field on a web form that is being automated. The script that I am running is: - my $response = $mech->get( "$TESTURL/ManageProjects.aspx" ); $mech->follow_link(text=>"Autotest"); sleep(1); $mech->form_name( 'f' ); $mech->set_fields( fileImport=> getcwd()."/foreign_test_data.txt"); The last line does not work correctly. I have worked around this my telling the used to select the required file manually at this point, and then press return to continue. Win32::IE::Mechanize has no problem with clicking on form buttons, following links, etc. The HTML that is not being set correctly is... ... <form name="f" method="post" action="ManageProject.aspx?projectId=22" id="f" enctype="multipart/form-data"> ... <input name="fileImport" id="fileImport" type="file" width="150" /> ...
Hi, At this moment I cannot find a way to set the value on an INPUT type=file element: http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file.asp I have added a TODO test in t/formbasics.t in the hope I might find a way to do is. sorry I cannot be more helpful. -- Abe.