All html elements not loaded

53 views
Skip to first unread message

aturcino

unread,
Oct 2, 2013, 11:37:58 AM10/2/13
to zomb...@googlegroups.com
Hi all,

As mentioned in the title I can't see all the elements(#id2) after running the test. Elements can be normally seen when inspecting elements in Chrome Developer Tools.

Sample code:

var Browser = require('../libs/zombie');
var assert = require('../libs/assert');
var browser = new Browser({debug:true, runScripts: false})

describe('Sample app', function() {
  it('should load home page', function(done){
    browser.visit("http://testpage.com/some", function(){
        browser.wait(3000, function(){
            browser.assert.text("title", "Test");
            browser.assert.element("#id1");
            browser.assert.element("#id2");
            console.log("Content:", browser.html());
            done();
        });
    });
  });
});

Error message: Uncaught AssertionError: Expected 1 elements matching '#id2' , found 0

Any help or ideas on how to handle this?
Reply all
Reply to author
Forward
0 new messages