• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • Selenium -- WEB層面的自動化測試工具

    發表于:2010-07-07來源:作者:點擊數: 標簽:seleniumSelenium工具自動化web
    Selenium -- WEB層面的自動化 測試工具 軟件測試 Selenium是由THOUGHWORKS公司 開發 的基于WEB層面的 自動化測試 工具。它是由JAVASCRIPT開發的,支持PYTHON,RUBY,C#,JAVA, PHP ,PERL 等多種語言。它有三部分組成,Selenium-IDE:應用層錄制工具;Seleniu

      Selenium -- WEB層面的自動化測試工具 軟件測試

      Selenium是由THOUGHWORKS公司開發的基于WEB層面的自動化測試工具。它是由JAVASCRIPT開發的,支持PYTHON,RUBY,C#,JAVA,PHP,PERL 等多種語言。它有三部分組成,Selenium-IDE:應用層錄制工具;Selenium-RC(Remote Controller):支持不同語言的客戶端驅動,包含Selenium-SERVER;Selenium-core,主要為JAVASCRIPT核心代碼,對于selenium的功能擴展有幫助。

      一般使用selenium選擇TestNG or Junit框架,因為這兩個框架都能和selenium,ANT很好的結合,并且都提供ResultReport的功能。準備好Selenium-RC,Junit(TestNG),我們的自動化之旅開始了。

      這里有個之后會影響測試的BUG先解決掉,在Selenium1.0中對網頁彈出窗口無法捕捉,我們怎么做呢?

      在selenium-server.jar中core文件夾下scripts文件下的selenium-browerbot.js中修改如下的JS代碼:

    var newOpen = function(url, windowName, windowFeatures, replaceFlag) {
           var myOriginalOpen = originalOpen;
           if (isHTA) {
               myOriginalOpen = this[originalOpenReference];
           }
           if (windowName == "" || windowName == "_blank") {
               windowName = "selenium_blank" + Math.round(100000 * Math.random());
               LOG.warn("Opening window '_blank', which is not a real window name. Randomizingtarget to be: " + windowName);
           }
           var penedWindow = myOriginalOpen(url, windowName, windowFeatures, replaceFlag);
           LOG.debug("window.open call intercepted; window ID (which you can use with selectWindow()) is \"" + windowName + "\"");
           if (windowName!=null) {
               openedWindow["seleniumWindowName"] = windowName;
           }
           selenium.browserbot.openedWindows[windowName] = openedWindow;
           return openedWindow;
       };

      轉為:

    var newOpen = function(url, windowName, windowFeatures, replaceFlag) {
           // var myOriginalOpen = originalOpen;
           //var myOriginalOpen = window.open;
             if (isHTA) {
               // myOriginalOpen = this[originalOpenReference];
             }
             if( !windowFeatures )
             {
             windowFeatures = null;
             }
             if( !replaceFlag )
             {
             replaceFlag = null;
             }

             var penedWindow = null;
             if( !windowFeatures && !replaceFlag )
             {
               openedWindow = this.window.open(url, windowName);

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>