For a login through pharo using the html form there is a method of Znclient which is formAt:add: followed by a post. So I was wondering how to I fill a textArea of html form and make post. Is there a method for such action?
<div><textarea id="technique" name="technique" class="technique">jumping</textarea></div><label>Résultats :</label>
<div><textarea id="resultat" name="resultat" class="resultat">Higher score</textarea></div><label>Conclusion :</label>
<div><textarea id="conclusion" name="conclusion" class="conclusion">Best jumper of the school</textarea></div>
Looking into
ZnClient
class in the System Browser you can see the comments for following methods:formAt:add:
- "Add key equals value to the application/x-www-form-urlencoded entity of the current request. This is for multi-values form fields."formAt:put:
- "Set key equal to value in the application/x-www-form-urlencoded entity of the current request."formAdd:
- "Add the key->value association to the application/x-www-form-urlencoded entity of the current request."formAddAll:
- "Add all key->value associations of keyedCollection to the application/x-www-form-urlencoded entity of the current request."We haven't used
formAt:add:
in any of our previous q&a on this and we should avoid it here. Use one of the last 3 methods:then...
or...
or this...