<i id='WHojS'><tr id='WHojS'><dt id='WHojS'><q id='WHojS'><span id='WHojS'><b id='WHojS'><form id='WHojS'><ins id='WHojS'></ins><ul id='WHojS'></ul><sub id='WHojS'></sub></form><legend id='WHojS'></legend><bdo id='WHojS'><pre id='WHojS'><center id='WHojS'></center></pre></bdo></b><th id='WHojS'></th></span></q></dt></tr></i><div id='WHojS'><tfoot id='WHojS'></tfoot><dl id='WHojS'><fieldset id='WHojS'></fieldset></dl></div>
  • <legend id='WHojS'><style id='WHojS'><dir id='WHojS'><q id='WHojS'></q></dir></style></legend>

      <tfoot id='WHojS'></tfoot>
    1. <small id='WHojS'></small><noframes id='WHojS'>

        <bdo id='WHojS'></bdo><ul id='WHojS'></ul>
      1. 使用预期条件时未定义的属性“绑定"

        undefined property #39;bind#39; when using expected conditions(使用预期条件时未定义的属性“绑定)
      2. <small id='3ZMek'></small><noframes id='3ZMek'>

          • <bdo id='3ZMek'></bdo><ul id='3ZMek'></ul>
            <tfoot id='3ZMek'></tfoot>

                  <tbody id='3ZMek'></tbody>
              • <i id='3ZMek'><tr id='3ZMek'><dt id='3ZMek'><q id='3ZMek'><span id='3ZMek'><b id='3ZMek'><form id='3ZMek'><ins id='3ZMek'></ins><ul id='3ZMek'></ul><sub id='3ZMek'></sub></form><legend id='3ZMek'></legend><bdo id='3ZMek'><pre id='3ZMek'><center id='3ZMek'></center></pre></bdo></b><th id='3ZMek'></th></span></q></dt></tr></i><div id='3ZMek'><tfoot id='3ZMek'></tfoot><dl id='3ZMek'><fieldset id='3ZMek'></fieldset></dl></div>

              • <legend id='3ZMek'><style id='3ZMek'><dir id='3ZMek'><q id='3ZMek'></q></dir></style></legend>

                  本文介绍了使用预期条件时未定义的属性“绑定"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用预期条件函数让量角器在继续之前等待页面上存在项目.

                  http://angular.github.io/protractor/#/api?view=ExpectedConditions

                  我已按照文档中的示例进行操作,但收到有关未定义属性的错误.

                  这似乎是使用任何预期条件时的情况,而不仅仅是与我在这里使用的 presentOf 函数有关:

                  var EC = protractor.ExpectedConditionsvar pixel = element.all(by.repeater('item in items'))var pixelLoaded = EC.presenceOf(pixels)browser.wait(pixelsLoaded,10000)

                  <块引用>

                  失败:无法读取未定义的属性绑定"堆:TypeError:无法读取未定义的属性绑定"在 [object Object].ExpectedConditions.presenceOf (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/lib/expectedConditions.js:233:33)在环境.(/foo/bar/app/features/pixelmanager/test/pixelManagerPOTest.js:48:31)在/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/jasminewd2/index.js:95:14在 [object Object].promise.ControlFlow.runInFrame_ (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20)在 [object Object].promise.ControlFlow.runEventLoop_ (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1755:8)在 [对象对象].(/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2056:12)在 goog.async.run.processWorkQueue (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:125:21)在 runMicrotasksCallback (node.js:337:7)在 process._tickCallback (node.js:355:11)来自:任务:在控制流中运行在对象.(/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/jasminewd2/index.js:94:33)==== 异步任务 ====错误在套房.(/foo/bar/app/features/pixelmanager/test/pixelManagerPOTest.js:44:5)在对象.(/foo/bar/app/features/pixelmanager/test/pixelManagerPOTest.js:9:1)在 Module._compile (module.js:460:26)在 Object.Module._extensions..js (module.js:478:10)在 Module.load (module.js:355:32)在 Function.Module._load (module.js:310:12)

                  解决方案

                  通过移除对 all 的不当调用来修复:

                  var 像素 = element(by.repeater('item in items'));

                  I'm trying to use the expected conditions function to make protractor wait for the presence of items on a page before continuing.

                  http://angular.github.io/protractor/#/api?view=ExpectedConditions

                  I have followed the example in the docs, but I am getting an error about an undefined property.

                  This seems to be the case when using any expected condition, not just related to the presenceOf function I am using here:

                  var EC = protractor.ExpectedConditions
                  var pixels = element.all(by.repeater('item in items'))
                  var pixelsLoaded = EC.presenceOf(pixels)
                  
                  browser.wait(pixelsLoaded,10000)
                  

                  Failed: Cannot read property 'bind' of undefined Stack: TypeError: Cannot read property 'bind' of undefined at [object Object].ExpectedConditions.presenceOf (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/lib/expectedConditions.js:233:33) at Env. (/foo/bar/app/features/pixelmanager/test/pixelManagerPOTest.js:48:31) at /foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/jasminewd2/index.js:95:14 at [object Object].promise.ControlFlow.runInFrame_ (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20) at [object Object].promise.ControlFlow.runEventLoop_ (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1755:8) at [object Object]. (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2056:12) at goog.async.run.processWorkQueue (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:125:21) at runMicrotasksCallback (node.js:337:7) at process._tickCallback (node.js:355:11) From: Task: Run it in control flow at Object. (/foo/bar/node_modules/gulp-protractor/node_modules/protractor/node_modules/jasminewd2/index.js:94:33) ==== async task ==== Error at Suite. (/foo/bar/app/features/pixelmanager/test/pixelManagerPOTest.js:44:5) at Object. (/foo/bar/app/features/pixelmanager/test/pixelManagerPOTest.js:9:1) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12)

                  解决方案

                  Fixed by removing the improper call to all:

                  var pixels = element(by.repeater('item in items'));
                  

                  这篇关于使用预期条件时未定义的属性“绑定"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What are valid deviceNames for Chrome emulation testing with Protractor?(使用 Protractor 进行 Chrome 模拟测试的有效设备名称是什么?)
                  Protractor Check if Element Does Not Exist(量角器检查元素是否不存在)
                  Protractor e2e Tests Login Redirection(Protractor e2e 测试登录重定向)
                  Explain about async/ await in Protractor(解释 Protractor 中的 async/await)
                  Protractor browser.wait doesn#39;t wait(量角器 browser.wait 不等待)
                  How to use Protractor with Angular 2?(如何在 Angular 2 中使用量角器?)
                  <legend id='YfoNY'><style id='YfoNY'><dir id='YfoNY'><q id='YfoNY'></q></dir></style></legend>
                    <tbody id='YfoNY'></tbody>

                    <bdo id='YfoNY'></bdo><ul id='YfoNY'></ul>
                  • <tfoot id='YfoNY'></tfoot>
                    <i id='YfoNY'><tr id='YfoNY'><dt id='YfoNY'><q id='YfoNY'><span id='YfoNY'><b id='YfoNY'><form id='YfoNY'><ins id='YfoNY'></ins><ul id='YfoNY'></ul><sub id='YfoNY'></sub></form><legend id='YfoNY'></legend><bdo id='YfoNY'><pre id='YfoNY'><center id='YfoNY'></center></pre></bdo></b><th id='YfoNY'></th></span></q></dt></tr></i><div id='YfoNY'><tfoot id='YfoNY'></tfoot><dl id='YfoNY'><fieldset id='YfoNY'></fieldset></dl></div>
                  • <small id='YfoNY'></small><noframes id='YfoNY'>