【发布时间】:2016-09-06 07:30:59
【问题描述】:
我正在尝试在 Drupal 7 中提交。
输入名称有方括号,如下:
<textarea class="text-full form-textarea" id="edit-body-und-0-value" name="body[und][0][value]" cols="60" rows="4"></textarea>
我正在尝试使用标准方式:
casper.waitForSelector("form input[name='title']", function() {
this.fillSelectors('form#post-node-form', {
'input[name = title ]': 'White title here',
'input[name = body[und][0][value] ]': 'Write body content here'
}, true);
});
但它返回错误:
FAIL Errors encountered while filling form: no field matching css selector "input[name = body[und][0][value] ]" in form
我尝试使用\ 逃脱,但仍然无效。
【问题讨论】:
-
如果任何给定的答案解决了您的问题,您可以accept 其中一个。如果没有,请详细说明问题所在。
标签: javascript css-selectors casperjs