Getting "Frame window is not acessible" while calling custom DSL

Issue

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.

Solution

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.

Answered By – karlgold

Answer Checked By – David Marino (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.