public IdleWindow() { InitializeComponent(); testsPage = new TestsPage(); idlePage = new IdlePage(); taskPage = new TaskPage(); var testInfo = Actions.GetTestQuestions(); /// UNTIL NOT RELIZE testInfo.IsComplated if (!testInfo.IsCompleted) /// HERE { MyFrame.Navigate(testsPage); } else { MyFrame.Navigate(idlePage); } testsPage.SkipButton.Click += Button_Skip; idlePage.task1.Click += Button_To_Task; taskPage.backToIdlePageButton.Click += Button_Skip; idlePage.toTestAgain.Click += Button_To_Test_Page; }
public HomeTabbedPage() { BarBackgroundColor = (Color)Application.Current.Resources["ToolBarColor"]; SelectedColor = (Color)Application.Current.Resources["AddCustomTaskBgColor"]; BarBackgroundApplyTo = BarBackgroundApplyTo.Android; NavigationPage.SetHasNavigationBar(this, false); // Hide nav bar HelpPage helpPage = new HelpPage(); StaticsCalenderViewPage stat = new StaticsCalenderViewPage(); #pragma warning disable CS0618 // Type or member is obsolete #pragma warning disable CS0612 // Type or member is obsolete if (Device.OS == TargetPlatform.iOS) #pragma warning restore CS0612 // Type or member is obsolete #pragma warning restore CS0618 // Type or member is obsolete { TaskPage taskPage = new TaskPage(); Children.Add(taskPage); } else #pragma warning disable CS0618 // Type or member is obsolete #pragma warning disable CS0612 // Type or member is obsolete #pragma warning restore CS0612 // Type or member is obsolete #pragma warning restore CS0618 // Type or member is obsolete { TaskPage_Android taskPage_Android = new TaskPage_Android(); Children.Add(taskPage_Android); } Children.Add(stat); Children.Add(helpPage); }
public WorlSpaceViewModel() { infoUserPage = new InfoUserPage(); taskPage = new TaskPage(); myTasksPage = new MyTasksPage(); CurrentPage = infoUserPage; }
public BaseSteps() { driver = new ChromeDriver(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); driver.Navigate().GoToUrl("http://mark7.herokuapp.com/"); driver.Manage().Window.Maximize(); loginPage = new LoginPage(driver); taskPage = new TaskPage(driver); }
/// <summary> /// 审批时保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnApproveSave_Click(object sender, EventArgs e) { if (TaskPage.SaveData(ProcessAction.ApproveSave)) { MessageBox.ShowAndClose(this.Page, "保存成功!"); } else { MessageBox.ShowAndPop(this.Page, "此任务已不存在或您已无权处理此任务!", "/WorkSpace/MyWorklist.aspx"); } }
protected void btnSaveDraftHR_Click(object sender, EventArgs e) { if (TaskPage.SaveData(ProcessAction.SaveHRDraft)) { MessageBox.Show(this.Page, "保存申请成功!", "/Process/OAF/HRBP/OnBoardManage.aspx"); } else { MessageBox.Show(this.Page, "保存申请失败!"); } }
//保存草稿 protected void bnLeaveSaveDraft_Click(object sender, ImageClickEventArgs e) { if (TaskPage.SaveData(ProcessAction.SaveHRDraft)) { MessageBox.Show(this.Page, "保存申请成功!", "/Process/TAF/HRBP/LeftEmployeeMgr.aspx"); } else { MessageBox.Show(this.Page, "保存申请失败!"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (TaskPage.StartProcess(ProcessAction.Submit)) { MessageBox.ShowAndClose(this.Page, "提交申请成功!"); } else { MessageBox.Show(this.Page, "提交申请失败!"); } }
public void Before() { driver = new Driver(); loginPage = new LoginPage(driver); dashboardPage = new DashboardPage(driver); setTaskPage = new SetTaskPage(driver); taskPage = new TaskPage(driver); editTaskPage = new EditTaskPage(driver); loginPage.PopulateLogin("tteacher", "spitfire"); loginPage.ClickLogin(); }
public void btnCancel_Click(object sender, EventArgs e) { TaskPage.Comments = txtComments.Text; if (TaskPage.ApproveProcess(ProcessAction.Cancel)) { MessageBox.ShowAndPop(this.Page, "取消成功,该任务已进入到您的‘已处理的任务’中!", "/WorkSpace/MyWorklist.aspx"); } else { MessageBox.Show(this.Page, "取消申请失败!"); } }
//只保存数据 protected void btnleaveSave_Click(object sender, ImageClickEventArgs e) { TaskPage.Comments = txtComments.Text; if (TaskPage.SaveData(ProcessAction.DraftHR)) { MessageBox.ShowAndPop(this.Page, "保存离职员工信息成功!", "/Process/TAF/HRBP/LeftEmployeeMgr.aspx"); } //MessageBox.ShowAndClose(this.Page, "Submited process successfully!<br/>提交申请成功!"); else { MessageBox.Show(this.Page, "保存离职员工信息失败!"); } }
protected void btnSubmitMore_Click(object sender, EventArgs e) { TaskPage.Comments = txtComments.Text; if (TaskPage.SaveData(ProcessAction.SubmitHRBP)) { MessageBox.ShowAndPop(this.Page, "提交员工信息成功!", "/Process/OAF/HRBPSubmit.aspx"); } //MessageBox.ShowAndClose(this.Page, "Submited process successfully!<br/>提交申请成功!"); else { MessageBox.Show(this.Page, "提交员工信息失败!"); } }
//提交 protected void btnLeaveSubmitHRBP_Click(object sender, ImageClickEventArgs e) { TaskPage.Comments = txtComments.Text; if (TaskPage.StartProcess(ProcessAction.SubmitHRBP, "TAF")) { MessageBox.ShowAndPop(this.Page, "发起离职流程成功!", "/Process/TAF/HRBP/LeftEmployeeMgr.aspx"); } //MessageBox.ShowAndClose(this.Page, "Submited process successfully!<br/>提交申请成功!"); else { MessageBox.Show(this.Page, "发起离职流程失败!"); } }
protected void btnConfirm_Click(object sender, EventArgs e) { TaskPage.Comments = txtComments.Text; if (TaskPage.ApproveProcess(ProcessAction.Confirm)) { MessageBox.ShowAndPop(this.Page, "确认成功!", "/WorkSpace/MyWorklist.aspx"); } // MessageBox.ShowAndClose(this.Page, "Confirm process successfully!<br/>确认成功!"); else { // MessageBox.Show(this.Page, "确认失败!"); MessageBox.Show(this.Page, "此任务已被他人处理!"); } }
protected void btnSubmitOnboard_Click(object sender, EventArgs e) { TaskPage.Comments = txtComments.Text; TaskPage.DoProcessAction(ProcessAction.Submit, e); if (TaskPage.ApproveProcess(ProcessAction.Submit)) { MessageBox.ShowAndClose(this.Page, "提交表单成功!"); } else { MessageBox.Show(this.Page, "提交表单失败!"); } }
protected void btnSubmitCF_Click(object sender, EventArgs e) { //反射执行取得流程名称 MethodInfo mi = Page.GetType().GetMethod("SetValue"); mi.Invoke(Page, null); int ProcInstID = -1; if (TaskPage.StartProcess(ProcessAction.SubmitCF, "WF.K2\\SCF", Page.User.Identity.Name, ref ProcInstID)) { MessageBox.ShowAndPop(this.Page, "提交成功,该任务已进入到您的‘我的申请’中!", "/WorkSpace/MyStarted.aspx"); } else { MessageBox.Show(this.Page, "提交申请失败!"); } }
public override void SetUp() { base.SetUp(); Utilities.Login(fixture.Driver); // подготовка тестовых данных string projectName = "Autotest for tasks project " + DateTime.Now; ProjectsRequests.CreateProject(projectName); int projectId = ProjectsRequests.GetProjectId(projectName); string requestTaskName = "Autotest task from request" + DateTime.Now; TasksRequests.CreateTask(projectId, requestTaskName, "content"); int taskId = TasksRequests.GetTaskId(projectId, requestTaskName); page = new ProjectPage(fixture.Driver, projectId); taskPage = new TaskPage(fixture.Driver, projectId, taskId); }
protected void btnRework_Click(object sender, EventArgs e) { if (TaskPage.ApproveProcess(ProcessAction.Rework)) { if (TaskPage.WorkflowID == 3) { MessageBox.ShowAndPop(this.Page, "提交申请成功!", "/WorkSpace/MyWorklist.aspx"); } else { MessageBox.ShowAndClose(this.Page, "提交申请成功!"); } } else { MessageBox.Show(this.Page, "提交申请失败!"); } }
protected void btnSave_Click(object sender, EventArgs e) { if (TaskPage.SaveData(ProcessAction.Save)) { if (TaskPage.IsModifyPage) { MessageBox.Show(this.Page, "保存员工信息成功!", System.Web.HttpContext.Current.Request.Path + "?FormID=" + TaskPage.FormID); } else { MessageBox.ShowAndClose(this.Page, "保存申请成功!"); } } else { MessageBox.Show(this.Page, "保存申请失败!"); } }
protected void btnSaveDraft_Click(object sender, EventArgs e) { if (TaskPage.SaveData(ProcessAction.SaveDraft)) { if (TaskPage.WorkflowID == 3) { MessageBox.ShowAndPop(this.Page, "保存成功,该任务已进入到您的‘草稿箱’中!", "/WorkSpace/MyDraft.aspx"); } else { MessageBox.ShowAndReload(this.Page, "保存申请成功!"); } } //MessageBox.Show(this.Page, "Saved process successfully!<br/>保存申请成功!", "../OAF/HRBPSubmit.aspx?FormID=" + TaskPage.FormID + ""); else { MessageBox.Show(this.Page, "保存申请失败!"); } }
protected void btnReject_Click(object sender, EventArgs e) { TaskPage.Comments = txtComments.Text; TaskPage.DoProcessAction(ProcessAction.Reject, e); if (TaskPage.ApproveProcess(ProcessAction.Reject)) { if (TaskPage.WorkflowID == 3) { MessageBox.ShowAndPop(this.Page, "拒绝成功!该任务已进入到您的‘已处理的任务’中!", "/WorkSpace/MyWorklist.aspx"); } else { MessageBox.ShowAndClose(this.Page, "拒绝申请成功!"); } } else { MessageBox.ShowAndPop(this.Page, "此任务已不存在或您已无权处理此任务!", "/WorkSpace/MyWorklist.aspx"); } }
protected void btnStartCounter_Click(object sender, ImageClickEventArgs e) { TaskPage.Comments = txtComments.Text; TaskPage.DoProcessAction(ProcessAction.Approve, e); if (TaskPage.ApproveProcess(ProcessAction.StartCounter, "会签")) { if (TaskPage.WorkflowID == 3) { MessageBox.ShowAndPop(this.Page, "发起会签成功!", "/WorkSpace/MyWorklist.aspx"); } else { MessageBox.ShowAndClose(this.Page, "审批申请成功!"); } } else { MessageBox.Show(this.Page, "发起会签失败!"); } }
public void SetUp() { var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("test.json"); Configuration = builder.Build(); var browser = Configuration["browser"]; var urlDefault = Configuration["url"]; if (browser.Equals("chrome-headless")) { var options = new ChromeOptions(); options.AddArgument("--headless"); driver = new ChromeDriver(options); } if (browser.Equals("chrome")) { driver = new ChromeDriver(); } if (browser.Equals("fox")) { driver = new FirefoxDriver(); } driver.Manage().Window.Size = new Size(1440, 900); driver.Navigate().GoToUrl(urlDefault); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); loginPage = new LoginPage(driver); taskPage = new TaskPage(driver); }
public TaskGridViewModel(TaskPage mainPage, int a, bool isRoutine, GRItemModel _GRItemModel) { this.mainPage = mainPage; Items = new ObservableCollection <TaskItemModel>(); GRItemModel = _GRItemModel; if (isRoutine) { TopImage = App.User.routines[a].photo; TopLabel = App.User.routines[a].title; BackgroundColor = Color.WhiteSmoke; TitleTextColor = Color.FromHex("#272E32"); BackImage = "arrowicon.png"; //if(App.user.routines[a].audio != "") SoundButton = "waveicon.png"; int taskIdx = 0; foreach (task task in App.User.routines[a].tasks) { Items.Add(new TaskItemModel( App.User.routines[a].tasks[taskIdx].photo, App.User.routines[a].tasks[taskIdx].title, Color.FromHex("#272E32"), App.User.routines[a].tasks[taskIdx].isComplete, App.User.routines[a].tasks[taskIdx].isInProgress, new Command <int>( async(int _taskIdx) => { string routineId = App.User.routines[a].id; string taskId = App.User.routines[a].tasks[_taskIdx].id; int taskDbIdx = App.User.routines[a].tasks[_taskIdx].dbIdx; bool isTaskInProgress = App.User.routines[a].tasks[_taskIdx].isInProgress; bool isTaskComplete = App.User.routines[a].tasks[_taskIdx].isComplete; if (App.User.routines[a].tasks[_taskIdx].isSublistAvailable) { if (!isTaskComplete) { App.User.routines[a].tasks[_taskIdx].isInProgress = true; Items[_taskIdx].IsInProgress = true; firebaseFunctionsService.StartAT(routineId, taskId, taskDbIdx.ToString()); } await mainPage.Navigation.PushAsync(new StepsPage(a, _taskIdx, isRoutine, Items[_taskIdx], GRItemModel)); } else { if (!isTaskComplete) { if (isTaskInProgress) { App.User.routines[a].tasks[_taskIdx].isInProgress = false; App.User.routines[a].tasks[_taskIdx].isComplete = true; Items[_taskIdx].IsInProgress = false; Items[_taskIdx].IsComplete = true; firebaseFunctionsService.UpdateTask(routineId, taskId, taskDbIdx.ToString()); } else { App.User.routines[a].tasks[_taskIdx].isInProgress = true; Items[_taskIdx].IsInProgress = true; firebaseFunctionsService.StartAT(routineId, taskId, taskDbIdx.ToString()); } } } }), taskIdx )); taskIdx++; } } else { TopImage = App.User.goals[a].photo; TopLabel = App.User.goals[a].title; BackgroundColor = Color.FromHex("#272E32"); TitleTextColor = Color.WhiteSmoke; BackImage = "arrowiconwhite.png"; int actionIdx = 0; foreach (action action in App.User.goals[a].actions) { Items.Add(new TaskItemModel( App.User.goals[a].actions[actionIdx].photo, App.User.goals[a].actions[actionIdx].title, Color.WhiteSmoke, App.User.goals[a].actions[actionIdx].isComplete, App.User.goals[a].actions[actionIdx].isInProgress, new Command <int>( async(int _actionIdx) => { string goalId = App.User.goals[a].id; string actionId = App.User.goals[a].actions[_actionIdx].id; int actionDbIdx = App.User.goals[a].actions[_actionIdx].dbIdx; bool isActionInProgress = App.User.goals[a].actions[_actionIdx].isInProgress; bool isActionComplete = App.User.goals[a].actions[_actionIdx].isComplete; if (App.User.goals[a].actions[_actionIdx].isSublistAvailable) { if (!isActionComplete) { App.User.goals[a].actions[_actionIdx].isInProgress = true; Items[_actionIdx].IsInProgress = true; firebaseFunctionsService.StartAT(goalId, actionId, actionDbIdx.ToString()); } await mainPage.Navigation.PushAsync(new TaskCompletePage(a, _actionIdx, isRoutine, Items[_actionIdx], GRItemModel)); } else { if (!isActionComplete) { if (isActionInProgress) { App.User.goals[a].actions[_actionIdx].isInProgress = false; App.User.goals[a].actions[_actionIdx].isComplete = true; Items[_actionIdx].IsInProgress = false; Items[_actionIdx].IsComplete = true; firebaseFunctionsService.UpdateTask(goalId, actionId, actionDbIdx.ToString()); } else { App.User.goals[a].actions[_actionIdx].isInProgress = true; Items[_actionIdx].IsInProgress = true; firebaseFunctionsService.StartAT(goalId, actionId, actionDbIdx.ToString()); } } } }), actionIdx )); actionIdx++; } } }
static void Main(string[] args) { log4net.Config.BasicConfigurator.Configure(); log4net.ILog log = log4net.LogManager.GetLogger(typeof(Program)); log.Info("Starting"); System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("es"); System.Threading.Thread.CurrentThread.CurrentCulture = ci; Console.WriteLine("Options "); Console.WriteLine("1: Cerrar Actividades CM"); Console.WriteLine("2: Crear Tarea"); Console.WriteLine("3: Cerrar Tarea"); Console.WriteLine("4: Crear Tareas (excel)"); Console.WriteLine("5: Download report as csv"); Console.WriteLine("6: Open app (IE)"); Console.WriteLine("8: Crear defecto"); Console.Write("Escoger opcion: "); var option = Console.ReadLine(); Console.WriteLine("Opcion escogida es: {0}", option); switch (option) { case "8": var defectsExcel = new ExcelQueryFactory("Defects.xlsx"); var defects = from x in defectsExcel.Worksheet <DefectDTO>() select x; foreach (var def in defects) { if (def.IdAuthorization != null) { Login(); log.InfoFormat("Creando Defecto: {0}", def.ToString()); var autPage = new AutorizationPage(driver); string autPageUrl = ""; autPageUrl += ConfigurationManager.AppSettings["URLBase"]; autPageUrl += ConfigurationManager.AppSettings["WISearchURLPartialHistory"]; autPage.GoToURL(string.Format(autPageUrl, def.IdAuthorization)); string areaProyecto = autPage.AreaProyecto(); log.InfoFormat("Area proyecto {0}", areaProyecto); string PrmUrl = ""; PrmUrl += ConfigurationManager.AppSettings["URLBase"]; PrmUrl += ConfigurationManager.AppSettings["WISearchURLPartialHistory"]; Console.WriteLine("Prmurl {0}", PrmUrl); autPage.GoToURL(string.Format(PrmUrl, autPage.Father())); SolPage solPage = new SolPage(driver); solPage.FillAttributes(def); var defPage = new DefectPage(driver); string newDefUrl = ""; newDefUrl += ConfigurationManager.AppSettings["URLBase"]; newDefUrl += ConfigurationManager.AppSettings["ProjectAreaURLPartial"]; newDefUrl += ConfigurationManager.AppSettings["URLdefectPartial"]; defPage.GoToURL(string.Format(newDefUrl, areaProyecto)); defPage.CreateDefect(def); var input = Console.ReadLine(); Logout(); } } break; case "6": string currentDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); string driverFolder = Path.Combine(currentDirectory, ConfigurationManager.AppSettings["DriversDirectory"]); var options = new InternetExplorerOptions { IgnoreZoomLevel = true, ForceCreateProcessApi = true, BrowserCommandLineArguments = "-private", PageLoadStrategy = PageLoadStrategy.None }; string site = ConfigurationManager.AppSettings["IEUrl"]; string usuario = ConfigurationManager.AppSettings["IEUser"]; string clave = ConfigurationManager.AppSettings["IEPassword"]; driver = new InternetExplorerDriver(driverFolder, options); var NetAppLogin = new NetAppLogin(driver); NetAppLogin.GoToURL(site); Console.WriteLine("now is {0}", DateTime.Now.ToLongTimeString()); Console.WriteLine("about to start...."); Console.WriteLine("now is {0}", DateTime.Now.ToLongTimeString()); AutoItX.WinActivate("Windows Security"); AutoItX.WinWaitActive("Windows Security"); AutoItX.Sleep(500); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{TAB}"); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{TAB}"); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{ENTER}"); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{TAB}"); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{ENTER}"); AutoItX.WinActivate("Windows Security"); AutoItX.Sleep(500); AutoItX.WinActivate("Windows Security"); AutoItX.Send("TIM"); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{ASC 092}"); AutoItX.WinActivate("Windows Security"); AutoItX.Send(usuario); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{TAB}"); AutoItX.WinActivate("Windows Security"); AutoItX.Sleep(500); AutoItX.WinActivate("Windows Security"); AutoItX.Send(clave); AutoItX.WinActivate("Windows Security"); AutoItX.Send("{ENTER}"); break; case "5": Login(); var savedQueryPage = new SavedQueryPage(driver); savedQueryPage.downloadCSV(); log.Info("Se descargó reporte en download"); Logout(); break; case "4": var tasksExcel = new ExcelQueryFactory("Tasks.xlsx"); var timeTasks = from x in tasksExcel.Worksheet <TimeTask>() select x; foreach (var task in timeTasks) { if (task != null && task.ToString() != null && task.IdTicket != "" && task.IdTicket != null) { Login(); log.InfoFormat("Creando Tarea: {0}", task.ToString()); Console.WriteLine(task.ToString()); Console.WriteLine("taskplanned for {0}", task.TaskPlannedFor == null); int taskCode = Int32.Parse(task.IdTicket); NewTaskPage taskPage = null; taskPage = new NewTaskPage(driver, taskCode); if (task.TimeSpentHr.Contains(",")) { task.TimeSpentHr = task.TimeSpentHr.Replace(",", "."); Console.WriteLine("new timespent {0}", task.TimeSpentHr); } taskPage.VisitTicketLinksTab(task); Logout(); } else { log.Error("No se procesan tareas nulas"); } } //report Login(); savedQueryPage = new SavedQueryPage(driver); savedQueryPage.downloadCSV(); log.Info("Se descargó reporte en download"); Logout(); break; case "3": //close task tarea var taskCode1 = int.Parse(ConfigurationManager.AppSettings["TaskID"]); var page1 = new TaskPage(driver, "", null); page1.GoTo(taskCode1); page1.CloseTask("Completada"); //Completada o Invalida o En Trabajo break; case "2": //crear task var taskPage2 = new NewTaskPage(driver, int.Parse(ConfigurationManager.AppSettings["IdTicket"])); taskPage2.VisitTicketLinksTab(null); break; case "1": try { Login(); int startRow = int.Parse(ConfigurationManager.AppSettings["startRow"]); int endRow = int.Parse(ConfigurationManager.AppSettings["endRow"]); int processingAssignations = endRow - startRow + 1; Console.WriteLine("Skipping {0} attention(s)", startRow - 2); Console.WriteLine("Processing {0} attention(s)", processingAssignations); var excel = new ExcelQueryFactory("Modelo.xlsx"); excel.AddTransformation <AssignationExcel>(x => x.DDS, cellValue => cellValue == "Y"); excel.AddTransformation <AssignationExcel>(x => x.Installed, cellValue => cellValue != "N"); excel.AddTransformation <AssignationExcel>(x => x.SourcesCompiled, cellValue => cellValue != "N"); excel.AddTransformation <AssignationExcel>(x => x.Special, cellValue => cellValue == "Y"); var assignations = from x in excel.Worksheet <AssignationExcel>() select x; var assignationList = assignations.ToList().Skip(startRow - 2).Take(processingAssignations); foreach (var task in assignationList) { Console.WriteLine("Processing Actividad id {0} summary {1} installed {2}", task.Id, task.Summary, task.Installed); //crear assignation request var request = new AssignationRequest(); if (task.Cycle > 0) { request.Cycle = task.Cycle; } if (task.DDS) { request.DDS = task.DDS; } request.Id = task.Id; if (!task.Installed) { request.Installation = task.Installed; } if (task.NumberDefects > 0) { request.NumberDefects = task.NumberDefects; } if (task.NumberPbls > 0) { request.NumberPBL = task.NumberPbls; } if (!task.SourcesCompiled) { request.SourcesCompiled = task.SourcesCompiled; } request.TimeSpent = task.TotalTime; Console.WriteLine("Task state {0}", task.ClosingState); if (task.ClosingState == 1) { request.ClosingState = SeleniumCM.Models.AssignationRequest.AttentionClosingState.ExitosoConErrores; } if (task.ClosingState == 2) { request.ClosingState = SeleniumCM.Models.AssignationRequest.AttentionClosingState.Stopper; } if (task.Special) { request.Special = task.Special; } var atencion = AssignationFactory.createAssignation(request); //Console.ReadLine(); //buscar actividad var activity = task.Id; var url = String.Format("https://172.19.112.112:9443/ccm/web/projects/CLARO.CERTIFICACION#action=com.ibm.team.workitem.viewWorkItem&id={0}&tab=esfuerzoscm", activity); driver.Navigate().GoToUrl(url); driver.Navigate().Refresh(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); IWebElement table = null; table = driver.FindElement(By.ClassName("DetailsSplitTable")); var i = 0; foreach (var tarea in atencion.Tasks) { //editar campos t1 IWebElement field = null; field = table.FindElements(By.TagName("input"))[i]; field.Clear(); field.SendKeys(tarea.ReportTime.ToString()); i++; } //guardar IWebElement saveBtn = null; saveBtn = driver.FindElement(By.CssSelector("button.primary-button")); saveBtn.Click(); //cambiar estado a Status IWebElement statusList = null; statusList = driver.FindElement(By.CssSelector("select[aria-label='Status']")); //select status var selectElement = new SelectElement(statusList); selectElement.SelectByText("Finalizado"); //cambiar estado a Resolution var resolutionList = driver.FindElement(By.CssSelector("select[aria-label='Resolution']")); //select status selectElement = new SelectElement(resolutionList); Console.WriteLine("Closing state {0}", request.ClosingState.ToString()); switch (request.ClosingState) { case SeleniumCM.Models.AssignationRequest.AttentionClosingState.Exitoso: selectElement.SelectByText("Exitoso"); break; case SeleniumCM.Models.AssignationRequest.AttentionClosingState.ExitosoConErrores: selectElement.SelectByText("Exitoso con Errores"); break; case SeleniumCM.Models.AssignationRequest.AttentionClosingState.Stopper: selectElement.SelectByText("Stopper (No Instalado)"); break; default: break; } //guardar final saveBtn.Click(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); ScreenshotHelper.TakeScreenshot(driver, request.Id); } } catch (Exception e) { Console.WriteLine("Exception Message {0}", e.Message); Console.WriteLine("Exception Trace {0}", e.StackTrace); } break; default: break; } //page object return return; }
public HerokupAppSteps(RemoteWebDriver _driver) { this.driver = _driver; this.config = new ConfiguracaoPage(driver); this.task = new TaskPage(driver); }