Exemplo n.º 1
0
        Agent CreateAgentOnWizard(string name, ePlatformType platform, Agent.eDriverType driverType)
        {
            WizardPOM wizard = WizardPOM.CurrentWizard;

            //skip intro page
            wizard.NextButton.Click();

            // set name
            wizard.CurrentPage["Name AID"].SetText(name);

            wizard.CurrentPage["Platform Type AID"].SelectValue(platform);
            wizard.CurrentPage["Driver Type AID"].SelectValue(driverType);

            // Driver config page
            wizard.NextButton.Click();
            wizard.Finish();

            // Verify agent appear on tree, might take some time
            bool b = mTreeView.IsItemExist(name);

            if (!b)
            {
                throw new Exception("Cannot find new agent in tree: " + name);
            }

            Agent agent = (from x in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Agent>() where x.Name == name select x).SingleOrDefault();

            return(agent);
        }
Exemplo n.º 2
0
        public Agent CreateAgent(string name, ePlatformType platform, Agent.eDriverType driverType)
        {
            mTreeView.AddButton.Click();
            SleepWithDoEvents(100);

            return(CreateAgentOnWizard(name, platform, driverType));
        }
Exemplo n.º 3
0
        public void CreateAgentsbyTestData(string agentName, string platfromType, string driverType)
        {
            // arrange
            // We get the data from the params

            //Act
            AgentsPOM     AgentsPOM = mGingerAutomator.MainWindowPOM.GotoAgents();
            ePlatformType platform1 = (ePlatformType)Enum.Parse(typeof(ePlatformType), platfromType);

            Agent.eDriverType driver1 = (Agent.eDriverType)Enum.Parse(typeof(Agent.eDriverType), driverType);

            AgentsPOM.CreateAgent(agentName, platform1, driver1);
            bool agentCreated = AgentsPOM.AgentsTree.IsItemExist(agentName);

            //Assert
            Assert.IsTrue(agentCreated, "Agent created: " + agentName + ", " + platfromType + ", " + driverType);
        }
Exemplo n.º 4
0
        public void CreateAgentsFromCSV()
        {
            // arrange
            string agentName    = mTC.DataRow["Name"].ToString();
            string platfromType = mTC.DataRow["PlatfromType"].ToString();
            string driverType   = mTC.DataRow["DriverType"].ToString();

            //Act
            AgentsPOM     AgentsPOM = mGingerAutomator.MainWindowPOM.GotoAgents();
            ePlatformType platform  = (ePlatformType)Enum.Parse(typeof(ePlatformType), platfromType);

            Agent.eDriverType driver = (Agent.eDriverType)Enum.Parse(typeof(Agent.eDriverType), driverType);

            AgentsPOM.CreateAgent(agentName, platform, driver);
            bool agentCreated = AgentsPOM.AgentsTree.IsItemExist(agentName);

            //Assert
            Assert.IsTrue(agentCreated, "Agent created: " + agentName + ", " + platfromType + ", " + driverType);
        }
Exemplo n.º 5
0
        internal Agent CreateAgent(string folderName, string name, ePlatformType platform, Agent.eDriverType driverType)
        {
            AgentsTree.SelectItem(folderName);
            mTreeView.SelectedItem.ContextMenu["Add New Agent"].Click();

            return(CreateAgentOnWizard(name, platform, driverType));
        }
Exemplo n.º 6
0
 /// <summary>
 /// Name of customized edit page for the driver to load on Agent edit page
 /// </summary>
 public virtual string GetDriverConfigsEditPageName(Agent.eDriverType driverSubType = Agent.eDriverType.NA)
 {
     return(null);
 }