0
var webpage = require('webpage').create();

webpage
  .open('http://example.com')
  .then(function(){
    var someContent = webpage.evaluate(function () {
        return document.querySelector("#aDiv").textContent;
    });

     console.log(someContent);
  });

It is called once, but my web page is dynamically changing. How can I intercept every change?

zondo
  • 19,901
  • 8
  • 44
  • 83
dnikitin
  • 1
  • 2

1 Answers1

0

if it's changed due to ajax calls, you should use onResourceReceived to observe changes

Zhang Bruce
  • 884
  • 1
  • 8
  • 23