browser.waitfor not working?

91 views
Skip to first unread message

Rod Simpson

unread,
May 1, 2015, 4:18:48 PM5/1/15
to zomb...@googlegroups.com
Hello,

I am using the 4.0.7 + io.js.

I am just trying to modify the simple example, but the script times out too soon (after 2000 ms).  I added a browser.waitfor (see code below), but this doesn't seem to change anything.

What should I change to increase the timeout to 20 or 30 seconds?

My code:


const Browser = require('zombie');

// We're going to make requests to http://example.com/signup
// Which will be routed to our test server localhost:3000
Browser.localhost('myserver.vm');

describe('User visits signup page', function() {

  const browser = new Browser();
  browser.waitFor = 99999; // <<<<<=========================I added this line, but it doesn't change the result.  The script needs to run about 10 to 20 seconds

  before(function(done) {
  });

  describe('submits form', function() {

    before(function(done) {
      browser
          .fill('#myfield', 'fieldname')
          .pressButton('#edit-save', done);
    });

    it('should be successful', function() {
      browser.assert.success();
    });

    it('should see welcome page', function() {
      browser.assert.text('title', 'Welcome To Brains Depot');
    });
  });
});

Ron Phillips

unread,
Jun 29, 2015, 3:35:33 PM6/29/15
to zomb...@googlegroups.com, rsim...@apigee.com
I would love for this question to be answered...  

I have events that don't fire until after the dom is loaded and within a settimeout (we are pushing page performance metrics via an image tag that loads on the page after dom ready).  I don't ever get visibility to this happening.  Zombie returns control and the resource collection doesn't contain this image request, ever.  Even when I try to set a long waitFor.
Reply all
Reply to author
Forward
0 new messages