<dfn id="is4kg"></dfn>
  • <ul id="is4kg"></ul>
  • <abbr id="is4kg"></abbr>
  • <ul id="is4kg"></ul>
    <bdo id="is4kg"></bdo>

    Rss & SiteMap

    曙海教育集團論壇 http://www.bjzhda.cn

    曙海教育集團論壇
    共2 條記錄, 每頁顯示 10 條, 頁簽: [1]
    [瀏覽完整版]

    標題:測試微軟Wince的拷屏代碼Code :)

    1樓
    wangxinxin 發表于:2010-11-16 11:38:43
    #region By v-gayang for VisualDiff
            /// <summary>
            /// Alert This folder already contain a folder called folder name
            /// Clew InformationDo: you really want to replace the older folder with the new folder?
            /// </summary>
            /// <returns>LogResult.Pass on success</returns>
            [TestCaseAttribute("Verify the Beam and Send Menu items are enabled when a file is selected", Type = TestType.VisualDiff)]
            [MobileDevicesDescriptor ( Product = Products.SmartPhone) ]    
            public Log.LogResult VerifyFolderAndReplaceFolder()
            {
                  Log.LogResult result = Log.LogResult.Pass;        

                  Utils.GlobalLogger.AddComment("Go to my documents");
                  FEAreaLib.Instance.GoToMyDocuments();

                  //Navigate to the root directory
                  Utils.GlobalLogger.AddComment("Go to the root directory");    
                  FEAreaLib.Instance.GoUpOneDirectory();        

                  // Add a new name "abc" folder
                  this.GoToFolder(true);
                  this.CreateNewFileFolder();

                  //Navigate to the \temp
                  Utils.GlobalLogger.AddComment("Go to the root temp directory");    
                  FEAreaLib.Instance.GoToMyDocuments();
                  FEAreaLib.Instance.GoUpOneDirectory();
                  FEAreaLib.Instance.ClickOn(tempPath);
                 

                  // Add a new name "abc" folder
                  this.OpinionRepeatFolder(true);
                  this.CreateNewFileFolder();

                  // Copy one Folder
                  string abc="abc";
                  this.CopyFileOrFolder(abc);

                  // Paste one Folder
                  FEAreaLib.Instance.GoToMyDocuments();
                  FEAreaLib.Instance.GoUpOneDirectory();
                  this.PasteFileOrFolder();

                  //snap for the Alert
                  Utils.GlobalLogger.AddComment("snap for Register: Do you really want to replace the older folder with the new folder?");
                  this.ssc.Capture("FileExplorer_PasteFolder_already_contain_Alert");
           
                  return result;
            }
           
            /// <summary>
            /// Alert A File name "<name>" already exist.
            /// Replace the exiting file "date" and "time" with this one .
            /// </summary>
            /// <returns>LogResult.Pass on success</returns>
            [TestCaseAttribute("Verify Alert A File name 'name' already exist.", Type = TestType.VisualDiff)]
            [MobileDevicesDescriptor ( Product = Products.SmartPhone) ]    
            public Log.LogResult VerifyFileAndReplaceFile()
            {
                  Log.LogResult result = Log.LogResult.Pass;        

                  Utils.GlobalLogger.AddComment("Go to my documents");
                  FEAreaLib.Instance.GoToMyDocuments();

                  //Navigate to the My Picture folder
                  Utils.GlobalLogger.AddComment("Go to the My Picture folder");    
                  FEAreaLib.Instance.GoToMyPictures();
                 
       
                  //Highlight the "flower" file
                  Utils.GlobalLogger.AddComment("highlight the waterfall");
                  FEAreaLib.Instance.KBNavigateTo("flower.jpg");

                  // Copy a name "picture" file
                  this.GoToFile(true);
                  this.CopyFileOrFolder(this.picturePath + @"\flower.jpg");

                  // A layer of catalogues on carriage return
                  Utils.GlobalLogger.AddComment("A layer of catalogues on carriage return ");    
                  FEAreaLib.Instance.GoUpOneDirectory();
                 

                  // Paste a File
                  Utils.GlobalLogger.AddComment("Paste a file");
                  this.PasteFileOrFolder();
                 

                  //snap for the Alert or the first time
                  Utils.GlobalLogger.AddComment("snap for Register: Paste a flower file Replace the exiting file <date> and <time>");    
                  this.ssc.Capture("FileExplorer_PasteFile_or_the_first_time_Alert");


                  // Paste a File
                  Utils.GlobalLogger.AddComment("Paste an existing file ");
                  this.PasteFileOrFolder();
                 

                  //snap for the Alert
                  Utils.GlobalLogger.AddComment("snap for Register: Do you really want to replace the older file with the new file?");    
                  this.ssc.Capture("FileExplorer_PasteFile_already_contain_date_and_time_Alert");    

                  return result;
            }
            #endregion
            #endregion

        #region Private Data
        // Add any private data/vars used by your tests here.
            private VisualDiff.SnapShotCreator ssc=null;
        #endregion

        #region Utility Functions
        private void CleanFolder(string dir)
        {
            if(Directory.Exists(dir))
            {        
              Directory.Delete(dir, true);
            }    
            Directory.CreateDirectory(dir);
        }

        private void GoToTestFolder(bool clean)
        {
            if(clean)
            {
              CleanFolder(this.testPath);
            }
            FEAreaLib.Instance.GoToMyDocuments();
            FEAreaLib.Instance.ClickOn(testDirectory);
        }

            private void GoToFolder(bool clean)
            {
                  if(clean)
                  {
                      CleanFolder(this.folderPath);
                  }
                  FEAreaLib.Instance.GoToMyDocuments();
                  FEAreaLib.Instance.GoUpOneDirectory();
    //               FEAreaLib.Instance.ClickOn(abcDirectory);
            }
            private void OpinionRepeatFolder(bool clean)
            {
                  if(clean)
                  {
                      CleanFolder(this.tempPath);
                  }
            }

            private void GoToFile(bool awardentityfile )
            {
                  if(awardentityfile)
                  {
                      this.CopyFileOrFolder(this.picturePath + @"\flower.jpg");
                  }
                  else
                  {
                      FileStream fs = System.IO.File.Create(this.picturePath + @"\flower.jpg");
                      fs.Close();
                      this.CopyFileOrFolder(this.picturePath + @"\flower.jpg");
                  }
            }
            #region Create NewFile Folder
            /// <summary>
            /// Create NewFile Folder
            /// </summary>
            private void CreateNewFileFolder()
            {
                  try
                  {
                      //press sk2.menu
                      Utils.GlobalLogger.AddComment("Press SK2 Menu");
                      Mtk.Softkeys.Current.PressSoftKey(Mtk.Softkeys.SoftKey.Right);
                 
                      // press 3 for edit
                      Utils.GlobalLogger.AddComment("press 3 for edit");
                      Mtk.Smartphone.KeyPad.Press(3);
                     
                      //press 6 for new folder
                      Utils.GlobalLogger.AddComment("press 6 for new folder");
                      Mtk.Smartphone.KeyPad.Press(6);
                     
                      //Press action button : Create New FileFolder
                      Utils.GlobalLogger.AddComment("Press action button Create New FileFolder");
                      Mtk.Smartphone.KeyPad.Press(Mtk.KeyPad.Key.Action);
           
                      //rename to New Folder
                      Utils.GlobalLogger.AddComment("rename to abc");
                      FEAreaLib.Instance.Rename("abc");
                     
                      //Press Action Button
                      Utils.GlobalLogger.AddComment("Press Action Button");
                      Mtk.Smartphone.KeyPad.Press(Mtk.KeyPad.Key.Action);
                  }
                  catch
                  {
                      Utils.GlobalLogger.AddComment("Fail: Folder Create");
                  }
                  finally
                  {
                      GC.Collect();
                      GC.WaitForPendingFinalizers();
                  }
            }
            #endregion
            #region Copy a File or Folder
            /// <summary>
            /// Copy one Folder
            /// </summary>
            private void CopyFileOrFolder(string abc)
            {
                  try
                  {
                      //press sk2.menu
                      FEAreaLib.Instance.ClickOn(abc);
                      Utils.GlobalLogger.AddComment("Press SK2 Menu");
                      Mtk.Softkeys.Current.PressSoftKey(Mtk.Softkeys.SoftKey.Right);
                 
                      // press 3 for edit
                      Utils.GlobalLogger.AddComment("press 3 for edit");
                      Mtk.Smartphone.KeyPad.Press(3);
                     
                      //press 2 for copy folder
                      Utils.GlobalLogger.AddComment("press 2 for new copy ");
                      Mtk.Smartphone.KeyPad.Press(Mtk.KeyPad.Key.D2);
           
    共2 條記錄, 每頁顯示 10 條, 頁簽: [1]

    Copyright © 2000 - 2009 曙海教育集團
    Powered By 曙海教育集團 Version 2.2
    Processed in .04688 s, 2 queries.
    主站蜘蛛池模板: 小泽玛利亚番号| 狠狠色先锋资源网| 在线电影一区二区| 久久国产一区二区三区| 欧美成人免费午夜影视| 又爽又黄又无遮挡网站| 青青青视频在线| 国产视频中文字幕| 中文字幕电影资源网站大全| 我被继夫添我阳道舒服男男| 收集最新中文国产中文字幕| 亚洲欧美日韩在线| 白丝女班长被弄得娇喘不停| 国产成a人亚洲精v品无码| aaa毛片免费观看| 思思91精品国产综合在线| 久热这里只有精品视频6| 欧美大片天天免费看视频| 加勒比综合在线| 色偷偷8888欧美精品久久| 国产精品28p| 9久热这里只有精品免费| 小坏蛋轻点阿受不了漫画| 久久福利一区二区| 最猛91大神ben与女教师| 亚洲精品动漫在线| 爱情鸟第一论坛com高清免费| 国产一区风间由美在线观看| 青青青激情视频在线最新| 国产精品永久免费| japanese六十路| 婷婷开心深爱五月天播播| 久久久亚洲欧洲日产国码二区| 日韩高清一区二区三区不卡| 亚洲第一成年免费网站| 狂野欧美性猛xxxx乱大交| 噜噜噜噜噜在线观看视频| 蕾丝av无码专区在线观看| 国产欧美日韩综合| 91酒店疯狂输出女神范范| 在线播放国产视频|