Thread Problem mit WWW::Mechanize::Shell und gleichen Variablen (3 answers)
Opened by zion2k at 2010-10-21 17:01

bianca
 2010-10-21 17:18
#142100 #142100
User since
2009-09-13
7016 Artikel
BenutzerIn

user image
In der Doku zu Mechanize finde ich unter $mech->set_fields

Quote
$mech->set_fields( $name => $value ... )
This method sets multiple fields of the current form. It takes a list of field name and value pairs. If there is more than one field with the same name, the first one found is set. If you want to select which of the duplicate field to set, use a value which is an anonymous array which has the field value and its number as the 2 elements.

Code (perl): (dl )
1
2
# set the second foo field
$mech->set_fields( $name => [ 'foo', 2 ] );

The fields are numbered from 1.


M.E. müsste dieses anonyme Array die Felder "theimage" füllen können.

Kombiniert mit dem Abschnitt
Quote
If the field is of type file (file upload field), the value is always cleared to prevent remote sites from downloading your local files. To upload a file, specify its file name explicitly.

würde ich die Dateinamen einsetzen.

Edit: Link korrigiert
Last edited: 2010-10-21 17:27:21 +0200 (CEST)
10 print "Hallo"
20 goto 10

View full thread Problem mit WWW::Mechanize::Shell und gleichen Variablen