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

<legend id='sULqR'><style id='sULqR'><dir id='sULqR'><q id='sULqR'></q></dir></style></legend>

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

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

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

        使用 Promise 配置多種功能

        Configuring multiple capabilities with promises(使用 Promise 配置多種功能)
      2. <tfoot id='aLGwp'></tfoot>
              <tbody id='aLGwp'></tbody>
          • <small id='aLGwp'></small><noframes id='aLGwp'>

            • <bdo id='aLGwp'></bdo><ul id='aLGwp'></ul>

                <legend id='aLGwp'><style id='aLGwp'><dir id='aLGwp'><q id='aLGwp'></q></dir></style></legend>

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

                  本文介紹了使用 Promise 配置多種功能的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  這是使用量角器設(shè)置firefox配置文件主題的后續(xù)內(nèi)容.

                  根據(jù)setFirefoxProfile howto,可以使用特殊的 "helper" js 代碼 使用 firefox-profileq 庫(kù)來(lái)進(jìn)行編碼火狐配置文件動(dòng)態(tài).

                  這對(duì)我有用,直到我嘗試使用多個(gè)瀏覽器并配置 multiCapabilities:

                  exports.config = {seleniumAddress: 'http://localhost:4444/wd/hub',多能力:[{瀏覽器名稱(chēng):'chrome',眼鏡: ['footer.disabledCookies.spec.js'],鉻選項(xiàng):{首選項(xiàng):{'profile.default_content_settings.cookies':2}}},...//這里的其他功能...helper.getFirefoxProfile()},...}

                  使用此設(shè)置我遇到了一個(gè)錯(cuò)誤(完整的回溯 這里):p><塊引用>

                  規(guī)范模式與任何文件都不匹配.

                  據(jù)我了解,這意味著使用 firefox 配置文件的設(shè)置缺少 specs 鍵.換句話(huà)說(shuō),它找不到任何要運(yùn)行的測(cè)試.

                  我已嘗試將 包含 specscapabilities 幫助器本身內(nèi)部的字典,但錯(cuò)誤仍然存??在.

                  如果使用 multiCapabilities,如何修復(fù)錯(cuò)誤并設(shè)置 firefox 配置文件?

                  <小時(shí)>

                  作為一種解決方法,我創(chuàng)建了一個(gè)單獨(dú)的量角器配置文件,僅配置了 firefox(使用 capabilities)并將 grunt 設(shè)置為運(yùn)行量角器兩次 - 一次對(duì)于這個(gè)帶有配置文件的firefox"配置,另一個(gè)用于所有其他瀏覽器.

                  解決方案

                  目前,protractor 只能在我們不使用 multicapabilities 的情況下接受 Promise 作為能力.這樣做的原因是因?yàn)?multiCapabilities 在一個(gè)新進(jìn)程中運(yùn)行每個(gè)任務(wù),所以不能傳遞承諾(函數(shù))(單個(gè)能力有效,因?yàn)槲覀儧](méi)有分叉).

                  或者,我們可以在啟動(dòng)器中解析功能,然后將解析的功能傳遞給新進(jìn)程;但是,這會(huì)破壞設(shè)置代理的能力(https://github.com/angular/protractor/pull/1040),它依賴(lài)于在 driverProvider 設(shè)置后解決的能力承諾.

                  我想不出一個(gè)簡(jiǎn)單的方法來(lái)做到這一點(diǎn)(沒(méi)有大的重構(gòu)),但它絕對(duì)是可行的.我為 Protractor 創(chuàng)建了一個(gè)問(wèn)題(https://github.com/angular/protractor/issues/1594).如果這是您需要的或者您有其他想法來(lái)實(shí)現(xiàn)它,請(qǐng)關(guān)注和/或評(píng)論它.

                  現(xiàn)在您需要使用您在原始問(wèn)題中提到的解決方法.

                  更新

                  https://github.com/angular/protractor/pull/1629 支持這個(gè).從量角器 1.6 開(kāi)始(或者如果您同步到 master),您可以將函數(shù)傳遞給 config.getMultiCapabilities,例如 onPrepareonCleanup.此函數(shù)可以向 multiCapabilties 返回一個(gè)承諾(即 capabilities 數(shù)組).

                  參見(jiàn) https://github.com/angular/protractor/blob/master/spec/以 getCapabilitiesConf.js 為例.

                  This is a follow-up to the Set firefox profile with protractor topic.

                  According to the setFirefoxProfile howto, it is possible to set a firefox profile with a special "helper" js code which uses firefox-profile and q libraries to make an encoded firefox profile on the fly.

                  This worked for me until I've tried to use multiple browsers and configuring multiCapabilities:

                  exports.config = {
                      seleniumAddress: 'http://localhost:4444/wd/hub',
                  
                      multiCapabilities: [
                          {
                              browserName: 'chrome',
                              specs: [
                                  'footer.disabledCookies.spec.js'
                              ],
                              chromeOptions: {
                                  prefs: {
                                      'profile.default_content_settings.cookies': 2
                                  }
                              }
                          },
                  
                          ...
                          // other capabilities here
                          ...
                  
                          helper.getFirefoxProfile()    
                       },
                  
                       ...
                  }
                  

                  With this setup I'm getting an error (full traceback here):

                  Spec patterns did not match any files.

                  As I understand, this means that the setup with firefox profile is missing specs key. In other words, it cannot find any tests to run.

                  I've tried to include specs into the capabilities dictionary inside the helper itself, but the error persists.

                  How to fix the error and set firefox profile if using multiCapabilities?


                  As a workaround, I've created a separate protractor configuration file with only firefox configured (using capabilities) and set grunt to run protractor twice - one for this "firefox with a profile" config and the other one for all other browsers.

                  解決方案

                  Right now, protractor can only accept promise as capabilities if we are NOT using multicapabilities. The reason for this is because multiCapabilities runs each task in a new process, so the promise (function) cannot be passed (single capabilities work because we're not forking).

                  Alternatively we could resolve capabilities in the launcher, before passing the resolved capabilities into the new processes; however, this will break the ability to set up proxies (https://github.com/angular/protractor/pull/1040), which relies on capability promises to be resolved after driverProvider setup.

                  I can't think of an easy way of doing this (without large refactoring), but it is definitely doable. I created an issue for Protractor (https://github.com/angular/protractor/issues/1594). Please follow that and/or comment on it if this is something you need or you have other ideas to implement it.

                  For now you would need to use the workaround you mentioned in your original question.

                  UPDATE

                  https://github.com/angular/protractor/pull/1629 supports this. Starting in protractor 1.6 (or if you sync to master) you can pass in a function to config.getMultiCapabilities like onPrepare and onCleanup. This function can return a promise to multiCapabilties (i.e. array of capabilities).

                  See https://github.com/angular/protractor/blob/master/spec/getCapabilitiesConf.js for an example.

                  這篇關(guān)于使用 Promise 配置多種功能的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 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 無(wú)法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開(kāi)發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                    <tbody id='Ql1N5'></tbody>

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

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

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

                          <bdo id='Ql1N5'></bdo><ul id='Ql1N5'></ul>
                            主站蜘蛛池模板: 91亚洲国产成人久久精品网站 | 日韩毛片| 成人小视频在线观看 | 男女一区二区三区 | 欧美在线观看免费观看视频 | 国产精品久久久久久久午夜片 | 人人射人人插 | 999久久久久久久久6666 | 国产午夜精品一区二区三区嫩草 | 视频一区二区在线观看 | 国产成人福利在线观看 | 久草青青| 天天av天天好逼 | 自拍偷拍第一页 | 999久久久久久久久6666 | 五月婷婷中文 | 国产一区视频在线 | 国产精品视频免费播放 | 最新中文字幕一区 | 综合久久久 | 亚洲成人99| 久久婷婷国产香蕉 | 亚洲成人精品在线观看 | 91精品国产乱码久久久久久久久 | 91高清免费观看 | 亚洲成人精品国产 | 午夜免费精品视频 | 欧美日韩久 | 一级大片 | 国产福利一区二区 | 中文字幕在线观看日韩 | 午夜影院在线观看 | 国产一区二区三区在线看 | 成年无码av片在线 | 欧美精品在线免费观看 | 成人不卡视频 | 一区视频在线免费观看 | 五月综合色啪 | 亚洲人成人一区二区在线观看 | 国产视频2021 | 拍真实国产伦偷精品 |