1

I grabbed Angular Seed project and modified its scenario test. I'm trying a really simple test, so I believe it's something I'm missing. Here is the DSL and Scenario spec:

angular.scenario.dsl('customDsl', function() {
  return function(selector) {
    return this.addFutureAction('customDsl', function ($window, $document, done) {
      done(null, selector + ' is ok!');
    });
  };
});

describe('my app', function() {
  it('should pass', function() {
    expect(customDsl('test')).toBe('test is ok!');
  });
});

When running the test it fails with the following message:

Frame window is not accessible.

I'm using Windows 7 and running scenarios in Chrome. To run the tests, I start the server node scripts\web-server.js, then scripts\e2e-test.bat.

Caio Cunha
  • 23,326
  • 6
  • 78
  • 74

1 Answers1

5

It seems like you need to move to a page of the application before you can run any scenarios. Check out:

http://plnkr.co/edit/cG4CQI

Note that adding

browser().navigateTo('/')

solves the problem. Take it out and you can replicate your error.

karlgold
  • 7,970
  • 2
  • 29
  • 22