コード例 #1
0
        public void GenerateTest()
        {
            List <IElement> allElements = XmlFilesLoader.Load(
                @"C:\Users\duongtd\Desktop\samples\exported\ToDoTest2\ToDoTest2\ToDoTest2Repo.xml",
                @"C:\Users\duongtd\Desktop\samples\exported\ToDoTest2\ToDoTest2\ToDoTest2ImageCapture.xml");
            MyLog myLog = new MyLog();
            ExcelSpecificationParser excelSpecificationParser = new ExcelSpecificationParser();
            List <SpecScreen>        specScreens = excelSpecificationParser.ParseWithRootElements(
                @"C:\Users\duongtd\Desktop\samples\TODO_spec_sample.xlsx",
                //@"D:\Research\projects\GUI-Testing-Automation\ProjectGenTemplate\Copy of TSDV-Sample-Mapping-Spec.xlsx",
                allElements, myLog);

            UserActionSpecAnalyzer specAnalyzer = new UserActionSpecAnalyzer();

            specAnalyzer.Expand(specScreens, @"C:\MyApp.exe", myLog);

            CSharpScriptsGeneration scriptsGeneration = new CSharpScriptsGeneration();

            scriptsGeneration.Generate(
                specScreens,
                @"D:\temp\out\project1",
                @"D:\temp\ElementsRepo.xml",
                @"D:\temp\ImageCapture.xml",
                @"D:\temp\app.exe",
                "MyTestProjectDefinition",
                "MyTestProject",
                "Instance",
                myLog);
        }
コード例 #2
0
 public void GetScriptAccessElementTest1()
 {
     List <IElement> allElements = XmlFilesLoader.Load(
         @"D:\Research\projects\GUI-Testing-Automation\Solution Utilities\exported projects\MyTestProject\MyTestProject\MyTestProjectRepo.xml",
         @"D:\Research\projects\GUI-Testing-Automation\Solution Utilities\exported projects\MyTestProject\MyTestProject\MyTestProjectImageCapture.xml");
     //Assert.AreEqual("Window_MainWindowForm.Button_Copy",
     //new CaptureSpecUserAction().GetScriptAccessElement(allElements[0].Children[0], "elements"));
 }
コード例 #3
0
 public void LoadTest()
 {
     List <IElement> re = XmlFilesLoader.Load(
         @"..\..\..\ProjectGenTemplate\ElementsRepo.xml",
         @"..\..\..\ProjectGenTemplate\ImageCapture.xml");
     Dictionary <string, IElement> re2 = XmlFilesLoader.Load2(
         @"..\..\..\ProjectGenTemplate\ElementsRepo.xml",
         @"..\..\..\ProjectGenTemplate\ImageCapture.xml");
 }
        public void ParseTest()
        {
            List <IElement> allElements = XmlFilesLoader.Load(
                @"D:\Research\projects\GUI-Testing-Automation\Solution Utilities\exported projects\MyTestProject\MyTestProject\MyTestProjectRepo.xml",
                @"D:\Research\projects\GUI-Testing-Automation\Solution Utilities\exported projects\MyTestProject\MyTestProject\MyTestProjectImageCapture.xml");
            ExcelSpecificationParser excelSpecificationParser = new ExcelSpecificationParser();

            excelSpecificationParser.ParseWithRootElements(
                //@"D:\Research\projects\UI-Testing-Automation\examples\Mapping and UserCode\TSDV-Sample-UserCode-Spec.xlsx",
                @"D:\Research\projects\GUI-Testing-Automation\ProjectGenTemplate\Copy of TSDV-Sample-Mapping-Spec.xlsx",
                allElements, new MyLog());
        }
コード例 #5
0
        public void ExpandTest()
        {
            List <IElement> allElements = XmlFilesLoader.Load(
                @"D:\Research\projects\GUI-Testing-Automation\Solution Utilities\exported projects\MyTestProject\MyTestProject\MyTestProjectRepo.xml",
                @"D:\Research\projects\GUI-Testing-Automation\Solution Utilities\exported projects\MyTestProject\MyTestProject\MyTestProjectImageCapture.xml");
            MyLog myLog = new MyLog();
            ExcelSpecificationParser excelSpecificationParser = new ExcelSpecificationParser();
            List <SpecScreen>        specScreens = excelSpecificationParser.ParseWithRootElements(
                @"C:\Users\duongtd\Desktop\TSDV-Sample-UserCode-Spec.xlsx",
                //@"D:\Research\projects\GUI-Testing-Automation\ProjectGenTemplate\Copy of TSDV-Sample-Mapping-Spec.xlsx",
                allElements, myLog);

            UserActionSpecAnalyzer specAnalyzer = new UserActionSpecAnalyzer();
            //specAnalyzer.Expand(specScreens, @"C:\MyApp.exe", myLog);
        }
コード例 #6
0
        public void GenerateTest()
        {
            List <IElement> allElements = XmlFilesLoader.Load(
                @"C:\Users\duongtd\Desktop\samples\exported\ToDoTest1\ToDoTest1\ToDoTest1Repo.xml",
                @"C:\Users\duongtd\Desktop\samples\exported\ToDoTest1\ToDoTest1\ToDoTest1ImageCapture.xml");
            List <IElement> listElements = new List <IElement>()
            {
                allElements[0],
                allElements[1],
                allElements[0].Children[0],
                allElements[0].Children[1]
            };

            new PictMasterFileGeneration().Generate(@"C:\Users\duongtd\Documents\abc.xls",
                                                    new ListUIElements(ListElementsIndicator.AllElements, listElements));
        }