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); }
public Agent CreateAgent(string name, ePlatformType platform, Agent.eDriverType driverType) { mTreeView.AddButton.Click(); SleepWithDoEvents(100); return(CreateAgentOnWizard(name, platform, driverType)); }
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); }
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); }
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)); }
/// <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); }