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

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

        如何使用量角器 conf js 測試單獨的環境名稱?

        how test separate environmental name with protractor conf js?(如何使用量角器 conf js 測試單獨的環境名稱?)
          <bdo id='Bf1jY'></bdo><ul id='Bf1jY'></ul>
          <tfoot id='Bf1jY'></tfoot>

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

                  <tbody id='Bf1jY'></tbody>
                <legend id='Bf1jY'><style id='Bf1jY'><dir id='Bf1jY'><q id='Bf1jY'></q></dir></style></legend>

                  本文介紹了如何使用量角器 conf js 測試單獨的環境名稱?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  [

                  上圖我正在運行 protractor Conf.js,具有特定的環境名稱,存儲在 JSON 文件中

                  The above pic i am run protractor Conf.js with particular environmental name which is stored in JSON file

                  如何僅在量角器測試用例中測試特定的環境 URL?

                  how to test particular environmental URL only in the protractor test case?

                  推薦答案

                  FIRST METHOD - 您必須在命令行中使用 params 變量傳遞參數.更新您的 conf.js 文件以包含名為 baseUrl 的參數和其他 url 變量,如下所示 -

                  FIRST METHOD - You have to pass the parameters using params variable in command line. Update your conf.js file to include a parameter called baseUrl and other url variables as shown below -

                  params: {
                      baseUrl: "http://default_url" //provide your default url to be used
                  }
                  

                  稍后在命令提示符中傳遞該值.方法如下-

                  later pass the value in the command prompt. Here's how -

                  protractor conf.js --params.baseUrl 'http://www.google.com'
                  

                  無論您在哪里有代碼來獲取規范中的 url,請使用以下代碼 -

                  Wherever you have code to get the url in your spec's, use the following code -

                  browser.get(browser.params.baseUrl);
                  

                  第二種方法 - 如果您不想每次都將 url 傳遞給 params 對象,那么您可以將它們存儲在 conf.js 中,甚至您的規格文件并調用它們.這是一個例子-

                  SECOND METHOD - If at all you don't want to pass the url to the params object everytime, then you can store them in your conf.js or even your specs file and call them. Here's an example -

                  你的 conf.js 文件 -

                  params: {
                      baseUrl: ""
                  },
                  onPrepare: function(){
                      switch(browser.params.baseUrl){
                        case 'firsturl':
                          browser.get("http://firsturl.com"); //replace firsturl with your actual url
                          break;
                        case 'secondurl':
                          browser.get("http://www.secondurl.com");
                          break;
                        default:
                          browser.get("http://www.defaulturl.com");
                   }
                  }
                  

                  現在通過命令行傳遞您要使用的 url -

                  Now pass the url's that you want to use through command line -

                  protractor conf.js --params.baseUrl 'firsturl' //to get first url
                  protractor conf.js //to open default url
                  

                  第三種方法 - 如果您在運行具有許多規范的測試套件時遇到問題,在這種情況下,上述第二種方法將不起作用.您需要在每個測試規范文件中使用 browser.get(),在這種情況下使用以下方法 -

                  THIRD METHOD - If at all you have a problem of running a test suite with many spec's, in that case above second method wouldn't work. You need to use browser.get() in each of your test spec files, in such cases use following method -

                  更新您的 conf.js 文件 -

                  Update your conf.js file -

                  params: {
                      baseUrl: "",
                      url: ""
                  },
                  onPrepare: function(){
                      switch(browser.params.baseUrl){
                        case 'firsturl':
                          browser.params.url = "http://firsturl.com"; //replace firsturl with your actual url
                          break;
                        case 'secondurl':
                          browser.params.url = "http://www.secondurl.com";
                          break;
                        default:
                          browser.params.url = "http://www.defaulturl.com";
                   }
                  }
                  

                  你的命令行命令 -

                  protractor conf.js --params.baseUrl 'firsturl' //to get first url
                  protractor conf.js //to open default url
                  

                  您的測試規范文件需要包含 browser.get() 命令.方法如下-

                  Your test spec files need to include the browser.get() command. Here's how -

                  browser.get(browser.params.url);
                  

                  希望對你有幫助.

                  這篇關于如何使用量角器 conf js 測試單獨的環境名稱?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  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標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                    <bdo id='EWytl'></bdo><ul id='EWytl'></ul>
                    <i id='EWytl'><tr id='EWytl'><dt id='EWytl'><q id='EWytl'><span id='EWytl'><b id='EWytl'><form id='EWytl'><ins id='EWytl'></ins><ul id='EWytl'></ul><sub id='EWytl'></sub></form><legend id='EWytl'></legend><bdo id='EWytl'><pre id='EWytl'><center id='EWytl'></center></pre></bdo></b><th id='EWytl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EWytl'><tfoot id='EWytl'></tfoot><dl id='EWytl'><fieldset id='EWytl'></fieldset></dl></div>

                      <legend id='EWytl'><style id='EWytl'><dir id='EWytl'><q id='EWytl'></q></dir></style></legend>
                    1. <small id='EWytl'></small><noframes id='EWytl'>

                              <tbody id='EWytl'></tbody>

                            <tfoot id='EWytl'></tfoot>
                          • 主站蜘蛛池模板: 影音先锋中文字幕在线观看 | 国内精品免费久久久久软件老师 | 日韩小视频在线 | 黄色片在线观看网址 | 亚洲一区二区三区在线播放 | 国产小视频在线 | 雨宫琴音一区二区在线 | 在线观看www高清视频 | 中文字幕国产一区 | 亚洲免费一区二区 | 精品国产乱码久久久久久丨区2区 | 日韩一区二区三区在线观看 | 国产高清视频 | 亚洲国产欧美在线人成 | 999热视频 | 久久精品手机视频 | 日本成人在线观看网站 | 天天干夜夜操 | 中文字幕精品一区 | 华人黄网站大全 | 欧美一区不卡 | 婷婷色国产偷v国产偷v小说 | 亚洲一区二区三区四区视频 | 精品国产欧美日韩不卡在线观看 | 日本综合在线观看 | 精品国产91久久久久久 | 在线免费观看视频黄 | 精品96久久久久久中文字幕无 | 国产成人福利在线观看 | 毛片一区二区三区 | 日韩一区在线观看视频 | 欧美在线视频网 | 久久黄色网 | 国产成人高清 | 有码在线| 国产91在线观看 | 色精品视频 | 午夜小视频在线播放 | 在线观看国产wwwa级羞羞视频 | 亚洲国产欧美日韩 | 国产精品久久久 |