I try using casper.js to get the text enclosed between div tags

casper.then(function() { var ctitle = this.getHTML('#Mdoule-Div > table > tbody > tr:nth-child(1) > td > table > tbody > tr > td > table > tbody > tr:nth-child(2) > td > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(14) > td > table > tbody > tr:nth-child(2) > td > table > tbody > tr > td > div'); console.log('ctitle'); 

});

I take the path to the element from the debugger in chrome. But nothing deduces what am I doing wrong?

  • did not display anything? judging by the code you should just output ctitle as a string - ddeadlink

0