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

  • <legend id='y4TPB'><style id='y4TPB'><dir id='y4TPB'><q id='y4TPB'></q></dir></style></legend>

    1. <tfoot id='y4TPB'></tfoot>
    2. <small id='y4TPB'></small><noframes id='y4TPB'>

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

        從 webdriver.io 獲取數據后動態構建 Mocha 測試

        Build Mocha test dynamically after getting data from webdriver.io(從 webdriver.io 獲取數據后動態構建 Mocha 測試)
        <i id='tFp9y'><tr id='tFp9y'><dt id='tFp9y'><q id='tFp9y'><span id='tFp9y'><b id='tFp9y'><form id='tFp9y'><ins id='tFp9y'></ins><ul id='tFp9y'></ul><sub id='tFp9y'></sub></form><legend id='tFp9y'></legend><bdo id='tFp9y'><pre id='tFp9y'><center id='tFp9y'></center></pre></bdo></b><th id='tFp9y'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tFp9y'><tfoot id='tFp9y'></tfoot><dl id='tFp9y'><fieldset id='tFp9y'></fieldset></dl></div>
        <legend id='tFp9y'><style id='tFp9y'><dir id='tFp9y'><q id='tFp9y'></q></dir></style></legend>
        • <small id='tFp9y'></small><noframes id='tFp9y'>

        • <tfoot id='tFp9y'></tfoot>

            • <bdo id='tFp9y'></bdo><ul id='tFp9y'></ul>
                <tbody id='tFp9y'></tbody>
                  本文介紹了從 webdriver.io 獲取數據后動態構建 Mocha 測試的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在尋找一種在異步獲取數據后定義 Mocha 測試的解決方案.

                  I'm looking for a solution to define Mocha tests after getting data asynchronously.

                  目前,我使用 gulp-webdriver 通過 Selenium 獲取 HTML 內容.我想測試某些 HTML 標簽結構.

                  For now, I use gulp-webdriver to getting HTML content with Selenium. And I want tests certain HTML tags structure.

                  例如,我想從 HTML 頁面中獲取所有按鈕結構.

                  For example, I want to get all buttons structure from an HTML page.

                  1° 在 Mocha Before() 中,我得到按鈕:

                  1° In Mocha Before(), I get buttons :

                  var buttons = browser.url("url").getHTML("button");
                  

                  2° 然后,我想在單獨的 it 中測試每個按鈕:

                  2° And after that, I want tests each button in a separate it :

                  buttons.forEach(function(button) {  it() }); 
                  

                  找到的唯一解決方案是在使用 data_driven 啟動 Mocha 測試之前使用 Gulp 加載 HTML 和提取按鈕或 leche.withData 插件.

                  The only solution found is loading HTML and extract buttons with Gulp before launch Mocha test with data_driven or leche.withData plugin.

                  您知道直接在 Mocha 測試定義中的另一種解決方案嗎?

                  Do you know another solution directly in Mocha test definition?

                  提前致謝,

                  推薦答案

                  似乎不可能用 mocha 動態創建 it() 測試.

                  It doesn't seem possible to dynamically create it() tests with mocha.

                  我終于像這樣組織我的測試了:

                  I finally organise my test like this :

                  it('Check if all tag have attribute', function() {
                          var errors = [];
                          elements.forEach(function(element, index, array) {
                              var $ = cheerio.load(element);
                              var tag = $(tagName);
                              if (tag.length) {
                                  if (!tag.attr(tagAttr)) errors.push(element);
                              }
                          });
                          expect(errors).to.be.empty;
                      }
                  }
                  

                  這篇關于從 webdriver.io 獲取數據后動態構建 Mocha 測試的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                    <bdo id='Op7j7'></bdo><ul id='Op7j7'></ul>
                      <legend id='Op7j7'><style id='Op7j7'><dir id='Op7j7'><q id='Op7j7'></q></dir></style></legend>
                      <tfoot id='Op7j7'></tfoot>

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

                          <tbody id='Op7j7'></tbody>
                        1. <i id='Op7j7'><tr id='Op7j7'><dt id='Op7j7'><q id='Op7j7'><span id='Op7j7'><b id='Op7j7'><form id='Op7j7'><ins id='Op7j7'></ins><ul id='Op7j7'></ul><sub id='Op7j7'></sub></form><legend id='Op7j7'></legend><bdo id='Op7j7'><pre id='Op7j7'><center id='Op7j7'></center></pre></bdo></b><th id='Op7j7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Op7j7'><tfoot id='Op7j7'></tfoot><dl id='Op7j7'><fieldset id='Op7j7'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 天天曰夜夜操 | 在线成人www免费观看视频 | www.47久久青青 | 成人毛片视频免费 | 中文字字幕在线中文乱码范文 | 中文字幕成人av | 三级黄色片在线播放 | 日韩在线电影 | 久久精品免费一区二区三 | 国内精品久久久久久 | 日日骚av | 欧美日韩美女 | 伊人久久一区二区 | 美女视频黄的免费 | 亚洲第一成年免费网站 | 久久久精品一区二区三区 | 国产美女在线看 | 中文字幕在线观看一区 | 激情欧美一区二区三区中文字幕 | 欧美1区2区 | 国产精品国产成人国产三级 | 欧美精品一区二区三区在线播放 | 精品久久久久久久久久 | 国产福利在线播放 | 国产精品无码久久久久 | 免费在线观看av网址 | 琪琪午夜伦伦电影福利片 | 日韩电影一区二区三区 | 巨大荫蒂视频欧美另类大 | 亚洲成人中文字幕 | 亚洲欧美在线视频 | 日韩中文字幕免费在线观看 | 久久久国产一区 | 久久高清国产视频 | 香蕉视频91 | 国产精品国产成人国产三级 | 亚洲综合视频一区 | 精品久久国产视频 | 日韩国产在线观看 | 免费激情 | 日韩二三区|