Even though recording the steps to upload an image works, the macro needs to be tweaked slightly for it to play back successfully.
After recording a click on the blue "Bilder hinzufügen" button to select and upload the image, the following commands are recorded (in this example we are selected the imacros-keyword-assertion-text.png image file located in the iMacros\DataSources folder):
Code: Select all
TAG POS=1 TYPE=INPUT:FILE ATTR=ID:html5_18ulol9fp1ee918r1173inl1pd35 CONTENT=C:\fakepath\imacros-keyword-assertion-text.png
TAG POS=1 TYPE=BUTTON FORM=ACTION:http://kleinanzeigen.ebay.de/anzeigen/p-anzeige-abschicken.html ATTR=ID:pictureupload-pickfiles
Code: Select all
TAG POS=1 TYPE=BUTTON FORM=ACTION:http://kleinanzeigen.ebay.de/anzeigen/p-anzeige-abschicken.html ATTR=ID:pictureupload-pickfiles CONTENT=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png
The same method can be used to upload images to Kijiji.ca. Recording the image upload on this site results in the following:
Code: Select all
TAG POS=1 TYPE=BUTTON ATTR=ID:ImageUploadButton
TAG POS=1 TYPE=INPUT:FILE ATTR=ID:html5_1abj9ajgn13e114jfjofu151nlg3 CONTENT=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png
TAG POS=1 TYPE=BUTTON ATTR=ID:ImageUploadButton
Code: Select all
TAG POS=1 TYPE=BUTTON ATTR=ID:ImageUploadButton CONTENT=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png