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

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

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

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

        • <bdo id='dS6Iy'></bdo><ul id='dS6Iy'></ul>
      1. <tfoot id='dS6Iy'></tfoot>
      2. Angularjs,使用 angular-recaptcha 進行 e2e 測試

        Angularjs, e2e test with angular-recaptcha(Angularjs,使用 angular-recaptcha 進行 e2e 測試)

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

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

              <small id='4FpRd'></small><noframes id='4FpRd'>

                <bdo id='4FpRd'></bdo><ul id='4FpRd'></ul>

                  本文介紹了Angularjs,使用 angular-recaptcha 進行 e2e 測試的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我實際上是在嘗試對我的簡單應用程序進行 e2e 測試,但在處理 angular-recaptcha 時遇到了一些麻煩(https://github.com/VividCortex/angular-recaptcha).

                  I'm actually trying to e2e test my simple application and I m having some troubles dealing with angular-recaptcha (https://github.com/VividCortex/angular-recaptcha).

                  這是我的測試:

                    it('should redirect on another page', function() {
                  
                      browser.get('http://127.0.0.1:3000/#/');
                      var userName = element(by.model('auth.loginInfos.username'));
                      userName.sendKeys('consumer1@eco.com');
                  
                      var password = element(by.model('auth.loginInfos.password'));
                      password.sendKeys('consumer1');
                  
                  
                  
                      var recapt = element(by.id('recaptcha'));
                      recapt.sendKeys();/* How can I put the recaptcha value to true ? */
                  
                      var btn = element(by.className('btn'));
                      btn.click();
                      /**
                       * Assertions etc...
                       */
                  
                    });
                  

                  所以,您可以看到我正在嘗試填寫 recaptcha 值,但我不知道如何繼續.

                  So, you can see that I m trying to fill the recaptcha value and I don't know how to proceed.

                  你能幫幫我嗎?

                  注意:我正在使用量角器

                  感謝您的幫助

                  推薦答案

                  驗證碼加載在一個iframe中,需要先切換到它再嘗試檢查:

                  The captcha is loaded in an iframe, you need to switch to it before trying to check:

                  browser.switchTo().frame(0);
                  

                  其中 0 是幀索引.您可以使用框架名稱、ID 或以前找到的框架元素.

                  where 0 is a frame index. You can use a frame name, id or a previously found frame element.

                  使用 recaptcha 演示頁面的示例測試:

                  Sample test that uses the recaptcha demo page:

                  "use strict";
                  
                  describe("Recaptcha", function () {
                      beforeEach(function () {
                          browser.ignoreSynchronization = true;
                          browser.get("http://vividcortex.github.io/angular-recaptcha/");
                      });
                  
                      it("should click the captcha", function () {
                          browser.switchTo().frame(0).then(function () {
                              var checkbox = $(".recaptcha-checkbox-checkmark");
                  
                              // first hover the checkbox
                              browser.actions().mouseMove(checkbox).perform();
                  
                              // hardcoded delay
                              browser.sleep(500);
                  
                              // okat, now click - TODO: may be we should click with browser.actions().click() and provide the x, y coordinates for where to click
                              checkbox.click();
                          });
                  
                          // expectations
                      });
                  });
                  

                  請注意,在我的情況下,單擊后,它會要求選擇某些圖像,這些圖像完全可以完成不讓我的 selenium 自動化機器人通過測試的工作.如果你想真正通過驗證碼,根據 新的 Google reCAPTCHA 是如何工作的? 頁面以及有關此驗證碼如何工作的已知信息,我會嘗試以下操作:

                  Note that in my case, after the click, it asks to select certain images that would exactly do the job of not letting my selenium automation bot pass the test. If you want to actually pass the captcha, according to the How does new Google reCAPTCHA work? page and the known information about how this captcha works, I would try the following things:

                  • 使用您以前使用過的預加載配置文件打開瀏覽器(至少有瀏覽歷史記錄)
                  • 在啟動測試的瀏覽器中登錄谷歌帳戶
                  • 不要像普通人那樣通過 click() 點擊復選框并使用偏移量點擊它
                  • 玩弄瀏覽器操作之間的延遲
                  • open the browser with a pre-loaded profile that you've used before (that has the browsing history, at least)
                  • be logged into google account in the browser fired up for testing
                  • don't click the checkbox via click() and click it with an offset as a regular human would do
                  • play around with a delays between browser actions

                  另一點是,您無需對驗證碼的工作方式進行 e2e 測試 - 它超出了應用程序端到端測試的范圍.找到一種方法來為測試用戶禁用/關閉驗證碼,或者為您將針對其運行測試的特定構建.

                  Another point is that, you don't need to e2e test how the captcha works - it is out of scope of the end-to-end testing of your application. Find a way to disable/turn the captcha off for the testing users, or for a specific build that you will be running tests against.

                  這篇關于Angularjs,使用 angular-recaptcha 進行 e2e 測試的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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() 的限制?)
                • <legend id='fmfER'><style id='fmfER'><dir id='fmfER'><q id='fmfER'></q></dir></style></legend>

                      <tfoot id='fmfER'></tfoot>

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

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

                            <tbody id='fmfER'></tbody>

                            <i id='fmfER'><tr id='fmfER'><dt id='fmfER'><q id='fmfER'><span id='fmfER'><b id='fmfER'><form id='fmfER'><ins id='fmfER'></ins><ul id='fmfER'></ul><sub id='fmfER'></sub></form><legend id='fmfER'></legend><bdo id='fmfER'><pre id='fmfER'><center id='fmfER'></center></pre></bdo></b><th id='fmfER'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fmfER'><tfoot id='fmfER'></tfoot><dl id='fmfER'><fieldset id='fmfER'></fieldset></dl></div>
                            主站蜘蛛池模板: 成人国产精品色哟哟 | 欧美不卡在线 | 久久岛国| 欧美亚洲高清 | 日本国产精品视频 | 91欧美激情一区二区三区成人 | 精品91久久 | 久久99久久久久 | 亚洲视频在线看 | 一级免费毛片 | 人成在线 | 激情婷婷成人 | 欧美性影院 | 中文字幕在线免费观看 | 成人免费精品视频 | 欧美精品一区三区 | 国产一区二区三区免费 | 中文字幕免费在线 | 日韩欧美精品 | 在线观看黄色电影 | 91亚洲国产成人精品一区二三 | 日韩精品在线播放 | 成人av一区| 午夜精品福利视频 | 久久免费高清 | 99福利 | 精品一区二区三区在线观看国产 | 日韩天堂av | 青青久久久 | 午夜影院在线观看视频 | 男人的天堂一级片 | 波多野结衣电影一区 | 日韩成人影院在线观看 | 欧美xxxⅹ性欧美大片 | 国产成人99久久亚洲综合精品 | 午夜影院在线观看免费 | 在线亚洲免费 | 国产精品高清在线 | 一区二区三区国产 | 国产精品美女www爽爽爽视频 | 日本免费视频在线观看 |