加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

anglejs – 量角器E2E角“无法在窗口上找到”

发布时间:2020-12-17 07:47:05 所属栏目:安全 来源:网络整理
导读:在角度项目中运行我的测试后,我有一个奇怪的错误错误:等待量角器与页面同步时出错:“窗口无法找到角度”.我的量角器配置如下所示: require('coffee-script').register();exports.config = { seleniumServerJar: './node_modules/protractor/selenium/sele
在角度项目中运行我的测试后,我有一个奇怪的错误错误:等待量角器与页面同步时出错:“窗口无法找到角度”.我的量角器配置如下所示:
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')

从页面获取信息:

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用于回答.

在Protractor配置中更改框架选项为’jasmine2’为我解决了这个问题.

详见this thread.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读