【发布时间】:2018-02-03 16:47:13
【问题描述】:
casperjs设置id后找不到id
casper.then(function () {
screenLog();
var id = String("_newid_");
var arrow = this.evaluate(function () {
var arrows = document.querySelectorAll('span.select2-selection__arrow');
arrows[1].innerHTML = "aa";
arrows[1].id = id;
return arrows[1].innerHTML;
});
screenLog();
this.click("#"+id);
screenLog();});
然后是错误代码: CasperError:无法在不存在的选择器上调度 mousedown 事件:#newid
【问题讨论】:
标签: javascript browser phantomjs casperjs