dalekjs / dalek-browser-chrome

[unmaintained] Chrome Browser bindings for DalekJS
MIT License
15 stars 9 forks source link

`execute` stops continuation of testing #19

Closed niksy closed 9 years ago

niksy commented 9 years ago

If i try to use execute method to run some host script, Google Chrome instance just hangs in terminal and doesn’t do anything.

Example script:

module.exports = {
'Page title is correct': function (test) {
  test
    .open('http://google.com')
    .execute(function(){
        this.assert.title().is('Google', 'It has title');
    })
    .done();
}
};

Running assertion without execute is OK.

asciidisco commented 9 years ago

It hangs because you are trying to use Daleks assertion methods in the browser scope. You can only use the:

this.assert.ok(true || false, 'Your message');

in the browser scope at the moment.