Exemplo n.º 1
0
        public static void ClassInit(TestContext testContext)
        {
            string sampleSolutionFolder = TestResources.GetTestResourcesFolder(@"Solutions" + Path.DirectorySeparatorChar + "TestUndoBusinessFlow");

            mGingerAutomator = GingerAutomator.StartSession();
            mGingerAutomator.OpenSolution(sampleSolutionFolder);
        }
Exemplo n.º 2
0
        public static void ClassInitialize(TestContext TC)
        {
            CreateTestSolution();

            mGingerAutomator = GingerAutomator.StartSession();
            mGingerAutomator.OpenSolution(solutionFolder);
        }
Exemplo n.º 3
0
        public static void ClassInitialize(TestContext TC)
        {
            CreateTestSolution();

            // Init SR
            mGingerAutomator = new GingerAutomator();
            mGingerAutomator.StartGinger();
            mGingerAutomator.OpenSolution(solutionFolder);

            // WorkSpace.Instance.SolutionRepository.Open(solutionFolder);
            // mSolutionRepository = Ginger.App.CreateGingerSolutionRepository();
            // Ginger.App.InitClassTypesDictionary();
            // mSolutionRepository.Open(solutionFolder);
        }
Exemplo n.º 4
0
        public static void ClassInit(TestContext testContext)
        {
            //Arrange
            string name        = "MyNewPOM";
            string description = "MyDescription";

            string sampleSolutionFolder = TestResources.GetTestResourcesFolder(@"Solutions\POMsTest");
            string SolutionFolder       = TestResources.GetTestTempFolder(@"Solutions\POMsTest");

            if (Directory.Exists(SolutionFolder))
            {
                Directory.Delete(SolutionFolder, true);
            }

            CopyDir.Copy(sampleSolutionFolder, SolutionFolder);
            GingerAutomator mGingerAutomator = GingerAutomator.StartSession();

            mGingerAutomator.OpenSolution(SolutionFolder);

            mPOMsPOM = mGingerAutomator.MainWindowPOM.GotoPOMs();

            Agent mChromeAgent = (from x in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Agent>() where x.Name == "ChromeAgent" select x).SingleOrDefault();

            //Act
            prioritizedLocatorsList = new List <ElementLocator>()
            {
                new ElementLocator()
                {
                    Active = false, LocateBy = eLocateBy.ByName
                },
                new ElementLocator()
                {
                    Active = true, LocateBy = eLocateBy.ByID
                },
                new ElementLocator()
                {
                    Active = false, LocateBy = eLocateBy.ByXPath
                },
                new ElementLocator()
                {
                    Active = true, LocateBy = eLocateBy.ByRelXPath
                }
            };
            mLearnedPOM = mPOMsPOM.CreatePOM(name, description, "MyWebApp", mChromeAgent, @"HTML\HTMLControls.html", new List <eElementType>()
            {
                eElementType.HyperLink, eElementType.Table, eElementType.ListItem
            }, prioritizedLocatorsList);
        }
Exemplo n.º 5
0
        public static void ClassInit(TestContext TC)
        {
            mTC = TC;

            string sampleSolutionFolder = TestResources.GetTestResourcesFolder(@"Solutions\BasicSimple");

            SolutionFolder = TestResources.getGingerUnitTesterTempFolder(@"Solutions\VariablesTest");
            if (Directory.Exists(SolutionFolder))
            {
                Directory.Delete(SolutionFolder, true);
            }

            CopyDir.Copy(sampleSolutionFolder, SolutionFolder);

            mGingerAutomator = GingerAutomator.StartSession();
            mGingerAutomator.OpenSolution(SolutionFolder);
        }
Exemplo n.º 6
0
        public static void ClassInit(TestContext TC)
        {
            mTC = TC;
            mGingerAutomator.StartGinger();

            string sampleSolutionFolder = TestResources.GetTestResourcesFolder(@"Solutions\EnvsTest");

            SolutionFolder = TestResources.getGingerUnitTesterTempFolder(@"Solutions\EnvsTest");
            if (Directory.Exists(SolutionFolder))
            {
                Directory.Delete(SolutionFolder, true);
            }

            CopyDir.Copy(sampleSolutionFolder, SolutionFolder);

            mGingerAutomator.OpenSolution(SolutionFolder);

            LogFile = mTC.TestLogsDir + @"\GingerWPF_BasicsTest.txt";
        }