量角器E2E角"角不能在窗口&QUOT上找到; [英] Protractor E2E angular "angular could not be found on the window"

查看:179
本文介绍了量角器E2E角"角不能在窗口&QUOT上找到;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在角项目错误运行我的测试后,一个奇怪的错误:错误等待量角器与网页同步:。我量角器配置是这样的:

I have a strange error after running my tests in angular project Error: Error while waiting for Protractor to sync with the page: "angular could not be found on the window". My Protractor configuration looks like this:

require('coffee-script').register();

exports.config = {
  seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.39.0.jar',
  seleniumAddress: 'http://localhost:4444/wd/hub',

  capabilities: {
    browserName: 'chrome'
    //'chromeOptions': {
    //  'args': ['--disable-extensions']
    //}
  },

  specs: [
    '*_spec.coffee'
  ],

  allScriptsTimeout: 10000000000,
  baseUrl: 'http://localhost:9003/',

  jasmineNodeOpts: {
    isVerbose: false,
    showColors: true,
    includeStackTrace: true,
    defaultTimeoutInterval: 10000000000
  }
};

和测试:

loginPage = require './pages/log_in_page'

describe 'Log In', ->

      it 'shows after login', ->
        loginPage()
        .setEmail('test@dispatch.me')
        .setPass('a46s75d4as765d4a6s7d54as76d5as74das76d5')

从获取网页信息:

Get info from page:

module.exports = ->
      @email = element By.css '.test-i-login'
      @password = element By.css '.test-i-password'

      @setEmail = (name) =>
        @email.sendKeys(name)
        this

      @setPass = (number) =>
        @password.sendKeys(number)
        this
      this

有是在github上一些类似的问题,但我没有找到一个解决方案为我工作。 THX回答。

There're some similar issues on github, but there I didn't find a solution working for me. Thx for answering.

推荐答案

更改在量角器配置框架选项'jasmine2 固定为我这个问题。

Changing framework option in Protractor config to 'jasmine2' fixed this issue for me.

请参阅进一步的信息此线程

这篇关于量角器E2E角"角不能在窗口&QUOT上找到;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆