<ruby id="h6500"><table id="h6500"></table></ruby>
    1. <ruby id="h6500"><video id="h6500"></video></ruby>
          1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>
            • 軟件測試技術(shù)
            • 軟件測試博客
            • 軟件測試視頻
            • 開(kāi)源軟件測試技術(shù)
            • 軟件測試論壇
            • 軟件測試沙龍
            • 軟件測試資料下載
            • 軟件測試雜志
            • 軟件測試人才招聘
              暫時(shí)沒(méi)有公告

            字號: | 推薦給好友 上一篇 | 下一篇

            Selenium -- WEB層面的自動(dòng)化測試工具

            發(fā)布: 2010-7-07 09:31 | 作者: 不詳 | 來(lái)源: 領(lǐng)測測試網(wǎng)采編 | 查看: 573次 | 進(jìn)入軟件測試論壇討論

            領(lǐng)測軟件測試網(wǎng)

              Selenium -- WEB層面的自動(dòng)化測試工具 軟件測試

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

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

              這里有個(gè)之后會(huì )影響測試的BUG先解決掉,在Selenium1.0中對網(wǎng)頁(yè)彈出窗口無(wú)法捕捉,我們怎么做呢?

              在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;
               };

              轉為:

              <ruby id="h6500"><table id="h6500"></table></ruby>
            1. 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);

              延伸閱讀

              文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/

              TAG: selenium Selenium web Web WEB 工具 自動(dòng)化

              31/3123>


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

              1. <ruby id="h6500"><video id="h6500"></video></ruby>
                    1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>