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

    曙海教育集團(tuán)論壇Win CE 專區(qū)Wince技術(shù)討論區(qū) → 測(cè)試微軟Wince的拷屏代碼Code :)


      共有7622人關(guān)注過(guò)本帖樹(shù)形打印

    主題:測(cè)試微軟Wince的拷屏代碼Code :)

    美女呀,離線,留言給我吧!
    wangxinxin
      1樓 個(gè)性首頁(yè) | 博客 | 信息 | 搜索 | 郵箱 | 主頁(yè) | UC


    加好友 發(fā)短信
    等級(jí):青蜂俠 帖子:1393 積分:14038 威望:0 精華:0 注冊(cè):2010-11-12 11:08:23
    測(cè)試微軟Wince的拷屏代碼Code :)  發(fā)帖心情 Post By: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);
           

    支持(0中立(0反對(duì)(0單帖管理 | 引用 | 回復(fù) 回到頂部

    返回版面帖子列表

    測(cè)試微軟Wince的拷屏代碼Code :)








    簽名
    主站蜘蛛池模板: 好男人社区www在线视频| www..com色| 国产亚洲欧美在在线人成| 国产精品999| 国产成年无码v片在线| 国产成人小视频| 国产成人高清亚洲一区久久| 亚洲无圣光一区二区| 国产自产在线视频一区| 女教师合集乱500篇小说| 成人综合伊人五月婷久久| 日本大片免a费观看在线| 无码av天天av天天爽| 性欧美熟妇videofreesex| 欧美激情综合亚洲五月蜜桃| 男人进女人下面全黄大色视频| 神乃麻美三点尽露写真| 波多野结衣四虎| 翁止熄痒禁伦短文合集免费视频 | 国产色视频一区| 成人中文字幕在线| 放荡的女老板bd中文在线观看| 日韩在线视频不卡一区二区三区| 欧美色视频在线观看| 精品真实国产乱文在线| 69堂在线观看| 久久久久亚洲AV无码网站| 人人妻人人玩人人澡人人爽| 日本欧美视频在线| 欧美freesex黑人又粗超长| 亚洲成a人片在线观看久| 国产精品高清一区二区三区不卡| 女人扒下裤让男人桶到爽| 快点使劲舒服爽视频| 岛国片在线播放| 无码中文字幕色专区| 成年美女黄网站色大免费视频| 日韩资源在线观看| 欧美videosdesexo肥婆| 狠狠躁日日躁夜夜躁2022麻豆| 男女性潮高清免费网站|