久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='zQPCx'></tfoot>
    <i id='zQPCx'><tr id='zQPCx'><dt id='zQPCx'><q id='zQPCx'><span id='zQPCx'><b id='zQPCx'><form id='zQPCx'><ins id='zQPCx'></ins><ul id='zQPCx'></ul><sub id='zQPCx'></sub></form><legend id='zQPCx'></legend><bdo id='zQPCx'><pre id='zQPCx'><center id='zQPCx'></center></pre></bdo></b><th id='zQPCx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zQPCx'><tfoot id='zQPCx'></tfoot><dl id='zQPCx'><fieldset id='zQPCx'></fieldset></dl></div>

      <small id='zQPCx'></small><noframes id='zQPCx'>

    1. <legend id='zQPCx'><style id='zQPCx'><dir id='zQPCx'><q id='zQPCx'></q></dir></style></legend>

          <bdo id='zQPCx'></bdo><ul id='zQPCx'></ul>

      1. 量角器 - 如何將一組承諾的結(jié)果放入另一個(gè)數(shù)組

        protractor - how to get the result of an array of promises into another array(量角器 - 如何將一組承諾的結(jié)果放入另一個(gè)數(shù)組)
        <tfoot id='wuJrU'></tfoot>

        <small id='wuJrU'></small><noframes id='wuJrU'>

          1. <i id='wuJrU'><tr id='wuJrU'><dt id='wuJrU'><q id='wuJrU'><span id='wuJrU'><b id='wuJrU'><form id='wuJrU'><ins id='wuJrU'></ins><ul id='wuJrU'></ul><sub id='wuJrU'></sub></form><legend id='wuJrU'></legend><bdo id='wuJrU'><pre id='wuJrU'><center id='wuJrU'></center></pre></bdo></b><th id='wuJrU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wuJrU'><tfoot id='wuJrU'></tfoot><dl id='wuJrU'><fieldset id='wuJrU'></fieldset></dl></div>
              <bdo id='wuJrU'></bdo><ul id='wuJrU'></ul>
                <tbody id='wuJrU'></tbody>

            • <legend id='wuJrU'><style id='wuJrU'><dir id='wuJrU'><q id='wuJrU'></q></dir></style></legend>
                1. 本文介紹了量角器 - 如何將一組承諾的結(jié)果放入另一個(gè)數(shù)組的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我從這段代碼中得到了一系列承諾:element.all(by.repeater('unit in units')),我發(fā)現(xiàn)很難將數(shù)據(jù)放入另一個(gè)數(shù)組:

                  I got an array of promises from this code: element.all(by.repeater('unit in units')), and I am finding it really difficult to get the data into another array:

                  element.all(by.repeater('unit in units')).then(function (arr) {
                      var items = [];
                  
                      for (var i = 0; i < arr.length; i++) {
                        arr[i].getText().then(function(text) {
                          items.push(text);
                        });
                      }
                  
                     //PROBLEM ITEMS is Empty
                     console.log(items);
                  });
                  

                  推薦答案

                  設(shè)法以更簡單的方式獲得相同的結(jié)果,避免使用 Q 和中繼器.使用內(nèi)置地圖就可以了.

                  Managed to get the same result on a simpler way avoiding using Q and the repeater. Using the inbuilt map does the trick.

                  var tabs = element.all(by.css('.unitTabs li a')).map(function (elm) {
                      return elm.getText();
                  });
                  
                  tabs.then(function (result) {
                      var sorted = _.sortBy(result, function (name) { return name; });
                      for (var i = 0; i < result.length; i++) {
                          expect(result[i]).toBe(sorted[i]);
                      }
                  });
                  

                  這篇關(guān)于量角器 - 如何將一組承諾的結(jié)果放入另一個(gè)數(shù)組的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調(diào)用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

                2. <legend id='K4tW1'><style id='K4tW1'><dir id='K4tW1'><q id='K4tW1'></q></dir></style></legend>

                  <tfoot id='K4tW1'></tfoot>
                      • <bdo id='K4tW1'></bdo><ul id='K4tW1'></ul>

                            <i id='K4tW1'><tr id='K4tW1'><dt id='K4tW1'><q id='K4tW1'><span id='K4tW1'><b id='K4tW1'><form id='K4tW1'><ins id='K4tW1'></ins><ul id='K4tW1'></ul><sub id='K4tW1'></sub></form><legend id='K4tW1'></legend><bdo id='K4tW1'><pre id='K4tW1'><center id='K4tW1'></center></pre></bdo></b><th id='K4tW1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='K4tW1'><tfoot id='K4tW1'></tfoot><dl id='K4tW1'><fieldset id='K4tW1'></fieldset></dl></div>
                              <tbody id='K4tW1'></tbody>

                            <small id='K4tW1'></small><noframes id='K4tW1'>

                            主站蜘蛛池模板: xxxcom在线观看| 玖玖精品 | 九九激情视频 | 欧美日韩在线一区 | 在线天堂免费中文字幕视频 | 成人小视频在线观看 | 超碰97人人人人人蜜桃 | 91精品国产91久久久久游泳池 | 国产aⅴ爽av久久久久久久 | 狠狠操电影 | 涩涩视频在线观看 | 一区二区三区在线免费看 | 狠狠av| 99精品欧美一区二区三区综合在线 | 干干天天 | 91欧美精品成人综合在线观看 | 鸡毛片| 欧美久久影院 | 亚洲一区二区三区四区五区中文 | 亚洲综合激情 | 成人午夜免费福利视频 | 日韩欧美三级电影在线观看 | 国产一级视频免费播放 | av二区三区 | 亚洲精品一区二区冲田杏梨 | 国产精品视频一区二区三区不卡 | 91九色麻豆 | 日韩在线播放一区 | 久久精品免费一区二区 | 国产羞羞视频在线观看 | 国产精品久久欧美久久一区 | 天堂一区二区三区 | 日韩黄 | 欧美久久久久久久久 | 最新中文字幕在线 | 欧美精品一区二区免费 | 久久久久久久综合色一本 | 91亚洲国产成人久久精品网站 | 国产a区| 成人在线国产 | 欧美极品少妇xxxxⅹ免费视频 |