2

I'm trying to fetch one table from DOM and print it to the shell.

this.waitForSelector("table[bgcolor|='#ffffff']",function(){                
    casper.echo(document.querySelector("table[bgcolor|='#ffffff']"));
});

But it keeps printing null.

What am I missing?

Brice Favre
  • 1,511
  • 1
  • 15
  • 34
Srol
  • 721
  • 2
  • 7
  • 16
  • 1
    possible duplicate of [Reading javascript variable from website using PhantomJS](http://stackoverflow.com/questions/18831098/reading-javascript-variable-from-website-using-phantomjs) – Artjom B. Dec 29 '14 at 11:31
  • The other good read is this: [null for elements in phantomjs](http://stackoverflow.com/questions/14808221/null-for-elements-in-phantomjs) – Artjom B. Dec 29 '14 at 11:32

0 Answers0