Angularjs   发布时间:2022-04-20  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了anglejs – 量角器E2E角“无法在窗口上找到”大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在角度项目中运行我的测试后,我有一个奇怪的错误错误:等待量角器与页面同步时出错:“窗口无法找到角度”.我的量角器配置如下所示:
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')

页面获取信息:

@H_407_1@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.

大佬总结

以上是大佬教程为你收集整理的anglejs – 量角器E2E角“无法在窗口上找到”全部内容,希望文章能够帮你解决anglejs – 量角器E2E角“无法在窗口上找到”所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。