Getting empty response from browser.visit().

52 views
Skip to first unread message

Lee Rowlands

unread,
Mar 19, 2014, 5:10:34 AM3/19/14
to zomb...@googlegroups.com
Hi
I'm trying to use zombie with the mink driver.

I was having much luck so I broke it down to a raw JavaScript file.

When I use browser.visit(url) I get nothing from browser.html() in the callback.

When I use browser.resources.get(url) I get the expected body in response.body.

What am I doing wrong?

Here's the file contents:

var Browser = require("zombie");
var assert = require("assert");

// Load the page from localhost
browser = new Browser({maxWait: 60});
browser.resources.get("http://ipc.dev", function(error, response) {
  // Returns 200.
  console.log(response.statusText);

  // Returns the actual body.
  console.log(response.body);
});

browser.visit("http://ipc.dev", { debug: true}, function (err) {

  /** outputs:
  
   Cookies:

   Storage:

   Eventloop:

   Document:
  
   */
  browser.dump();
  if (err) {
    console.log(JSON.stringify(err.stack));
  }
  
  // Outputs nothing.
  console.
    log(browser.html());

});


Lee Rowlands

unread,
Mar 19, 2014, 5:11:18 AM3/19/14
to zomb...@googlegroups.com
*wasn't having much luck
Reply all
Reply to author
Forward
0 new messages