Commit 1446eb82 1446eb821a1591c70f7132b42bc3d296192ff06e by Mickaël Andrieu

Added docs for fillLabels() method

1 parent f851aa32
...@@ -983,7 +983,32 @@ are referenced by ``CSS3`` selectors:: ...@@ -983,7 +983,32 @@ are referenced by ``CSS3`` selectors::
983 'input[name="attachment"]': '/Users/chuck/roundhousekick.doc' 983 'input[name="attachment"]': '/Users/chuck/roundhousekick.doc'
984 }, true); 984 }, true);
985 }); 985 });
986
987 ``fillLabels()``
988 -------------------------------------------------------------------------------
989
990 **Signature:** ``fillLabels(String selector, Object values[, Boolean submit])``
991
992 .. versionadded:: 1.1
986 993
994 Fills a form with provided field values using associated label text Fields
995 are referenced by label content values::
996
997 casper.start('http://some.tld/contact.form', function() {
998 this.fillLabels('form#contact-form', {
999 Email: 'chuck@norris.com',
1000 Password: 'chuck',
1001 Content: 'Am watching thou',
1002 Check: true,
1003 No: true,
1004 Topic: 'bar',
1005 Multitopic: ['bar', 'car'],
1006 File: fpath,
1007 "1": true,
1008 "3": true,
1009 Strange: "very"
1010 }, true);
1011 });
987 1012
988 ``fillXPath()`` 1013 ``fillXPath()``
989 ------------------------------------------------------------------------------- 1014 -------------------------------------------------------------------------------
......