Commit a04a5b36 a04a5b3611988b6f301bee28d1fdf390d3cb5054 by Matt Bowman

Made parameter names more specific in selectorFunction functions

1 parent 90ab53e3
...@@ -823,10 +823,10 @@ Casper.prototype.fillNames = function fillNames(formSelector, vals, submit) { ...@@ -823,10 +823,10 @@ Casper.prototype.fillNames = function fillNames(formSelector, vals, submit) {
823 "use strict"; 823 "use strict";
824 return this.fillForm(formSelector, vals, { 824 return this.fillForm(formSelector, vals, {
825 submit: submit, 825 submit: submit,
826 selectorFunction: function _nameSelector(selector, form) { 826 selectorFunction: function _nameSelector(elementName, formSelector) {
827 return { 827 return {
828 fullSelector: [form, '[name="' + selector + '"]'].join(' '), 828 fullSelector: [formSelector, '[name="' + elementName + '"]'].join(' '),
829 elts: (this.findAll ? this.findAll('[name="' + selector + '"]', form) : null) 829 elts: (this.findAll ? this.findAll('[name="' + elementName + '"]', formSelector) : null)
830 }; 830 };
831 } 831 }
832 }); 832 });
...@@ -852,10 +852,10 @@ Casper.prototype.fillSelectors = function fillSelectors(formSelector, vals, subm ...@@ -852,10 +852,10 @@ Casper.prototype.fillSelectors = function fillSelectors(formSelector, vals, subm
852 "use strict"; 852 "use strict";
853 return this.fillForm(formSelector, vals, { 853 return this.fillForm(formSelector, vals, {
854 submit: submit, 854 submit: submit,
855 selectorFunction: function _css3Selector(selector, form) { 855 selectorFunction: function _css3Selector(inputSelector, formSelector) {
856 return { 856 return {
857 fullSelector: [form, selector].join(' '), 857 fullSelector: [formSelector, inputSelector].join(' '),
858 elts: (this.findAll ? this.findAll(selector, form) : null) 858 elts: (this.findAll ? this.findAll(inputSelector, formSelector) : null)
859 }; 859 };
860 } 860 }
861 }); 861 });
......
...@@ -209,10 +209,10 @@ ...@@ -209,10 +209,10 @@
209 files: [] 209 files: []
210 }; 210 };
211 211
212 findFunction = findFunction || function _nameSelector(name, form) { 212 findFunction = findFunction || function _nameSelector(elementName, formSelector) {
213 return { 213 return {
214 fullSelector: [form, '[name="' + name + '"]'].join(' '), 214 fullSelector: [formSelector, '[name="' + elementName + '"]'].join(' '),
215 elts: this.findAll('[name="' + name + '"]', form) 215 elts: this.findAll('[name="' + elementName + '"]', formSelector)
216 }; 216 };
217 }; 217 };
218 218
......