【问题标题】:Getting "Frame window is not acessible" while calling custom DSL调用自定义 DSL 时出现“无法访问框架窗口”
【发布时间】:2013-04-11 13:36:41
【问题描述】:

我抓住了 Angular Seed 项目并修改了它的场景测试。我正在尝试一个非常简单的测试,所以我相信这是我所缺少的。这是 DSL 和场景规范:

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!');
  });
});

运行测试失败并显示以下消息:

Frame window is not accessible.

我正在使用 Windows 7 并在 Chrome 中运行场景。为了运行测试,我启动了服务器 node scripts\web-server.js,然后是 scripts\e2e-test.bat

【问题讨论】:

    标签: angularjs angular-scenario


    【解决方案1】:

    您似乎需要先移动到应用程序的某个页面,然后才能运行任何场景。签出:

    http://plnkr.co/edit/cG4CQI

    注意添加

    browser().navigateTo('/')
    

    解决问题。把它拿出来,你就可以复制你的错误了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-18
      • 2016-05-05
      • 2012-08-18
      • 2021-06-18
      • 1970-01-01
      • 2014-11-07
      • 2014-12-31
      • 1970-01-01
      相关资源
      最近更新 更多