<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      架構人生

      針對Silverlight 4的UI自動化測試

      針對Silverlight 4的UI自動化測試

      目前Visual Studio 2010 SP1也早已發布,我們只需要在此基礎上裝Feature Pack 2補丁包,便可通過Coded UI Test來錄制Silverlight 4的UI界面了,并Playback你的測試用例了。注意,Feature Pack2的用處是在被測試機器(MUT)打的補丁。當然你在所有機器上都裝也不會有什么問題。

      這里我們有一個DLL文件需要注意:Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll

      這個DLL是用來幫助Coded UI Test識別Silverlight 4UI控件的,注意它是被Silverlight程序引用,而不是Test Project,很多朋友起初容易混淆。

      以下為BrowserWindow的錄制結果:

          [GeneratedCode("Coded UITest Builder""10.0.40219.1")]
          
      public class UISilverlightApplicatiWindow : BrowserWindow
          {
              
              
      public UISilverlightApplicatiWindow()
              {
                  
      #region Search Criteria
                  
      this.SearchProperties[UITestControl.PropertyNames.Name] = "SilverlightApplication1";
                  
      this.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";
                  
      this.WindowTitles.Add("SilverlightApplication1");
                  
      #endregion
              }
              
              
      public void LaunchUrl(System.Uri url)
              {
                  
      this.CopyFrom(BrowserWindow.Launch(url));
              }
              
              
      #region Properties
              
      public UISilverlightApplicatiDocument UISilverlightApplicatiDocument
              {
                  
      get
                  {
                      
      if ((this.mUISilverlightApplicatiDocument == null))
                      {
                          
      this.mUISilverlightApplicatiDocument = new UISilverlightApplicatiDocument(this);
                      }
                      
      return this.mUISilverlightApplicatiDocument;
                  }
              }
              
      #endregion
              
              
      #region Fields
              
      private UISilverlightApplicatiDocument mUISilverlightApplicatiDocument;
              
      #endregion
          }

      以下為HtmlDocument錄制結果:

          [GeneratedCode("Coded UITest Builder""10.0.40219.1")]
          
      public class UISilverlightApplicatiDocument : HtmlDocument
          {
              
              
      public UISilverlightApplicatiDocument(UITestControl searchLimitContainer) : 
                      
      base(searchLimitContainer)
              {
                  
      #region Search Criteria
                  
      this.SearchProperties[HtmlDocument.PropertyNames.Id] = null;
                  
      this.SearchProperties[HtmlDocument.PropertyNames.RedirectingPage] = "False";
                  
      this.SearchProperties[HtmlDocument.PropertyNames.FrameDocument] = "False";
                  
      this.FilterProperties[HtmlDocument.PropertyNames.Title] = "SilverlightApplication1";
                  
      this.FilterProperties[HtmlDocument.PropertyNames.AbsolutePath] = "/WebSite2/SilverlightApplication1TestPage.html";
                  
      this.FilterProperties[HtmlDocument.PropertyNames.PageUrl] = "http://localhost:24805/WebSite2/SilverlightApplication1TestPage.html";
                  
      this.WindowTitles.Add("SilverlightApplication1");
                  
      #endregion
              }
              
              
      #region Properties
              
      public UISilverlightControlHoPane UISilverlightControlHoPane
              {
                  
      get
                  {
                      
      if ((this.mUISilverlightControlHoPane == null))
                      {
                          
      this.mUISilverlightControlHoPane = new UISilverlightControlHoPane(this);
                      }
                      
      return this.mUISilverlightControlHoPane;
                  }
              }
              
      #endregion
              
              
      #region Fields
              
      private UISilverlightControlHoPane mUISilverlightControlHoPane;
              
      #endregion
          }

      Silverlight的MainPage錄制結果:

          [GeneratedCode("Coded UITest Builder""10.0.40219.1")]
          
      public class UIMainPageMainPage : SilverlightControl
          {
              
              
      public UIMainPageMainPage(UITestControl searchLimitContainer) : 
                      
      base(searchLimitContainer)
              {
                  
      #region Search Criteria
                  
      this.SearchProperties[UITestControl.PropertyNames.ControlType] = "MainPage";
                  
      this.WindowTitles.Add("SilverlightApplication1");
                  
      #endregion
              }
              
              
      #region Properties
              
      public SilverlightText UITextBlockText
              {
                  
      get
                  {
                      
      if ((this.mUITextBlockText == null))
                      {
                          
      this.mUITextBlockText = new SilverlightText(this);
                          
      #region Search Criteria
                          
      this.mUITextBlockText.SearchProperties[SilverlightText.PropertyNames.AutomationId] = "textBlock1";
                          
      this.mUITextBlockText.WindowTitles.Add("SilverlightApplication1");
                          
      #endregion
                      }
                      
      return this.mUITextBlockText;
                  }
              }
              
      #endregion
              
              
      #region Fields
              
      private SilverlightText mUITextBlockText;
              
      #endregion
          }

      另外:

      但是這里有一個問題,如果作為數據挖掘的蜘蛛爬蟲來說,如果數據源網站用silverlight做,但沒有引用Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll ,那么無論是數據抓取還是Coded UI Test,都無能為力了!!!

      可有高手解決此問題?

      posted on 2011-05-27 18:47  智艾悅  閱讀(1700)  評論(1)    收藏  舉報

      導航

      主站蜘蛛池模板: 无码a∨高潮抽搐流白浆| 云林县| 欧美极品色午夜在线视频| 蜜桃久久精品成人无码av| 东京热一精品无码av| 色偷偷女人的天堂亚洲网| 亚洲av不卡电影在线网址最新| 国产精品久久久久久福利69堂| 亚洲AV无码精品色午夜果冻| 免费无遮挡无码永久在线观看视频| 97久久精品人人澡人人爽| 国产成人亚洲综合91精品| 女人色熟女乱| 亚洲国产欧美一区二区好看电影 | 欧美日韩在线视频| 在线精品国产中文字幕| 国产精品一区二区久久岳| 国产精品综合一区二区三区 | 性色av一区二区三区精品| 麻豆一区二区三区精品蜜桃| 国产天美传媒性色av| 欧美不卡无线在线一二三区观| 高清无码爆乳潮喷在线观看| 无码人妻精品一区二区三区下载 | 日韩秘 无码一区二区三区 | 男人的天堂av社区在线| 吉川爱美一区二区三区视频| 国内精品无码一区二区三区| 少妇人妻偷人一区二区| 久久夜色精品国产亚洲av| 视频一区二区三区四区不卡 | 国产午夜在线观看视频| 富源县| 欧美亚洲色综久久精品国产| 亚洲一区二区三区18禁| 欧美精品国产综合久久| 国产二区三区不卡免费| 在线观看中文字幕国产码| 久久精品国产中文字幕| a4yy私人毛片| 国产熟睡乱子伦视频在线播放|