Why is Zombie.js not working with Google Charts?

I have a simple webpage that loads the Google chart API:

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
    google.charts.load("current", {packages:["corechart"]});
    console.log("load() called");
</script>

It works great when I hit it with my browser. In Chrome, a call load()requests a bunch of external resources:

External Resources (Chrome)

In Zombie only one external resource is requested:

zombie Opened window http://localhost/graph  +7s
zombie GET http://localhost/graph => 200 +17ms
zombie Loaded document http://localhost/graph +15ms
zombie GET https://www.gstatic.com/charts/loader.js => 200 +71ms
load() called
zombie Event loop is empty +135ms

Here is my simple zombie code for reference:

Browser.visit('http://localhost/graph', function (err, browser) {
    if (browser.errors.length > 0)
        return console.log(browser.statusCode, browser.errors);
});

No errors reported. I also tried to wait a few seconds, browser.wait()as well as a full web page that actually loads the chart. Zombie never loads other resources and, of course, never calls any callbacks in Google Charts.

Why doesn't Zombie seem to be able to use the Google Graphics API?

+6
1

, , , /, , .

, , PhantomJS. ZombieJS API Google, .

PhantomJS html , javascript . , javascript PhantomJS:

phantomjs chart.js

, PhantomJS, .

+1
source

All Articles