Casperjs querySelector返回null

时间:2019-03-11 05:40:31

标签: javascript node.js casperjs

casper.thenOpen('https://www.example.com/oo/abcd', function() { 
    var selector = ".pv-entity__degree-info";
    this.waitForSelector(selector,function success(){
        console.log("table found");
        var temp=this.evaluate(function(selector){
            return document.querySelector(selector);
        },selector);
        console.log(temp);
    },
        function fail() {
            console.log("oops");
        }
    );
 });

我做错了吗?它返回null。任何帮助将不胜感激。

0 个答案:

没有答案