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

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

      <tfoot id='5oGAd'></tfoot>
    1. <small id='5oGAd'></small><noframes id='5oGAd'>

        <bdo id='5oGAd'></bdo><ul id='5oGAd'></ul>

      1. <legend id='5oGAd'><style id='5oGAd'><dir id='5oGAd'><q id='5oGAd'></q></dir></style></legend>
      2. 如何在下拉 protractorjs e2e 測試中選擇選項

        How to select option in drop down protractorjs e2e tests(如何在下拉 protractorjs e2e 測試中選擇選項)

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

              <tbody id='fN56F'></tbody>
              <bdo id='fN56F'></bdo><ul id='fN56F'></ul>
                <legend id='fN56F'><style id='fN56F'><dir id='fN56F'><q id='fN56F'></q></dir></style></legend>
                  本文介紹了如何在下拉 protractorjs e2e 測試中選擇選項的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在嘗試從下拉列表中選擇一個選項,以使用量角器進行角度 e2e 測試.

                  I am trying to select an option from a drop down for the angular e2e tests using protractor.

                  這里是選擇選項的代碼片段:

                  Here is the code snippet of the select option:

                  <select id="locregion" class="create_select ng-pristine ng-invalid ng-invalid-required" required="" ng-disabled="organization.id !== undefined" ng-options="o.id as o.name for o in organizations" ng-model="organization.parent_id">
                      <option value="?" selected="selected"></option>
                      <option value="0">Ranjans Mobile Testing</option>
                      <option value="1">BeaverBox Testing</option>
                      <option value="2">BadgerBox</option>
                      <option value="3">CritterCase</option>
                      <option value="4">BoxLox</option>
                      <option value="5">BooBoBum</option>
                  </select>
                  

                  我試過了:

                  ptor.findElement(protractor.By.css('select option:1')).click();
                  

                  這給了我以下錯誤:

                  指定了無效或非法的字符串構(gòu)建信息:版本:'2.35.0',修訂:'c916b9d',時間:'2013-08-12 15:42:01'系統(tǒng)信息:os.name:'Mac OS X',os.arch:'x86_64',os.version:'10.9',java.version:'1.6.0_65'驅(qū)動信息:driver.version:未知

                  An invalid or illegal string was specified Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9', java.version: '1.6.0_65' Driver info: driver.version: unknown

                  我也試過了:

                  ptor.findElement(protractor.By.xpath('/html/body/div[2]/div/div[4]/div/div/div/div[3]/ng-include/div/div[2]/div/div/organization-form/form/div[2]/select/option[3]')).click();
                  

                  這給了我以下錯誤:

                  ElementNotVisibleError:元素當(dāng)前不可見,因此可能無法與之交互命令持續(xù)時間或超時:9 毫秒構(gòu)建信息:版本:'2.35.0',修訂:'c916b9d',時間:'2013-08-12 15:42:01'系統(tǒng)信息:os.name:'Mac OS X',os.arch:'x86_64',os.version:'10.9',java.version:'1.6.0_65'會話 ID:bdeb8088-d8ad-0f49-aad9-82201c45c63f驅(qū)動信息:org.openqa.selenium.firefox.FirefoxDriver功能 [{platform=MAC,acceptSslCerts=true,javascript Enabled=true,browserName=firefox,rotatable=false,locationContextEnabled=true,version=24.0,cssSelectorsEnabled=true,databaseEnabled=true,handlesAlerts=true,browserConnectionEnabled=true,nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=false, takeScreenshot=true}]

                  ElementNotVisibleError: Element is not currently visible and so may not be interacted with Command duration or timeout: 9 milliseconds Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9', java.version: '1.6.0_65' Session ID: bdeb8088-d8ad-0f49-aad9-82201c45c63f Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=24.0, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]

                  誰能幫我解決這個問題,或者說明我在這里可能做錯了什么.

                  Can anyone please help me with this problem or throw some light on what i might be doing wrong here.

                  推薦答案

                  我也遇到了類似的問題,最后寫了一個幫助函數(shù)來選擇下拉值.

                  I had a similar problem, and eventually wrote a helper function that selects dropdown values.

                  我最終決定我可以通過選項編號進行選擇,因此編寫了一個方法,該方法接受一個元素和 optionNumber,并選擇該 optionNumber.如果 optionNumber 為 null,則不選擇任何內(nèi)容(不選擇下拉菜單).

                  I eventually decided that I was fine selecting by option number, and therefore wrote a method that takes an element and the optionNumber, and selects that optionNumber. If the optionNumber is null it selects nothing (leaving the dropdown unselected).

                  var selectDropdownbyNum = function ( element, optionNum ) {
                    if (optionNum){
                      var options = element.all(by.tagName('option'))   
                        .then(function(options){
                          options[optionNum].click();
                        });
                    }
                  };
                  

                  如果您想了解更多詳細信息,我寫了一篇博文,其中還包括在下拉列表中驗證所選選項的文本:http://technpol.wordpress.com/2013/12/01/protractor-and-dropdowns-validation/

                  I wrote a blog post if you want more detail, it also covers verifying the text of the selected option in a dropdown: http://technpol.wordpress.com/2013/12/01/protractor-and-dropdowns-validation/

                  這篇關(guān)于如何在下拉 protractorjs e2e 測試中選擇選項的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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標頭) - 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() 的限制?)

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

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

                    <legend id='BM63Y'><style id='BM63Y'><dir id='BM63Y'><q id='BM63Y'></q></dir></style></legend>
                          <bdo id='BM63Y'></bdo><ul id='BM63Y'></ul>
                          <tfoot id='BM63Y'></tfoot>
                              <tbody id='BM63Y'></tbody>
                            主站蜘蛛池模板: 欧美日一区二区 | 久久久久久成人 | 中文字幕1区2区3区 亚洲国产成人精品女人久久久 | 黄色大片免费观看 | 精品视频免费 | 国产高清在线精品一区二区三区 | 日本不卡免费新一二三区 | 欧美在线a| 欧美色成人 | 日韩午夜电影在线观看 | 男女免费视频网站 | 伊人伊人 | 色频| 天天干天天爱天天操 | 欧美另类视频 | 国内久久精品 | 一级免费看片 | 伊大人久久 | 99久久精品国产一区二区三区 | 午夜精品一区二区三区三上悠亚 | 国产成人精品免费 | 一级片子 | 久久免费观看视频 | 日本激情一区二区 | 国产男女猛烈无遮掩视频免费网站 | 国产极品粉嫩美女呻吟在线看人 | www.日本在线观看 | 91国内精精品久久久久久婷婷 | 国产精品久久久久久久久久 | 欧美精品一区二区三区四区 在线 | 人人天天操 | 国产精品日韩欧美一区二区三区 | www.国产| 成人av观看 | 欧美日韩1区2区3区 欧美久久一区 | 夜夜av | 91在线精品一区二区 | 久久亚洲国产 | 亚洲免费观看 | 亚洲高清视频在线观看 | 欧美一级免费黄色片 |