void ReleaseDesignerOutlets() { if (CancelButton != null) { CancelButton.Dispose(); CancelButton = null; } if (ConfidenceTextField != null) { ConfidenceTextField.Dispose(); ConfidenceTextField = null; } if (EditTitle != null) { EditTitle.Dispose(); EditTitle = null; } if (LabelStaticText != null) { LabelStaticText.Dispose(); LabelStaticText = null; } if (LabelTextField != null) { LabelTextField.Dispose(); LabelTextField = null; } if (ModalView != null) { ModalView.Dispose(); ModalView = null; } if (OkButton != null) { OkButton.Dispose(); OkButton = null; } }
internal void EditShareSkill() { //Thread.Sleep(3000); GlobalDefinitions.Wait(3000); ManagementListingBtn.Click(); //Thread.Sleep(2000); GlobalDefinitions.Wait(2000); GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "EditShareSkill"); try { //Thread.Sleep(1000); GlobalDefinitions.Wait(1000); var table = _driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody")); //table var manageListRow = table.FindElements(By.TagName("tr")).ToList(); //all rows picked var isFound = false; // var rows = _driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr")); //each row and coloum for (int i = 1; i <= manageListRow.Count; i++) { var row = _driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]")); //each row and coloum var columnList = row.FindElements(By.TagName("td")).ToList(); //all coloum for (int j = 1; j <= columnList.Count; j++) { var oldManageList = _driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]/td[" + j + "]")); //each row and coloum //click on edit button with specific row and column if (oldManageList.Text == "Code") { isFound = true; _driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]/td[8]/div/button[2]/i")).Click(); //edit button break; } } if (isFound) { break; } } if (isFound) { Thread.Sleep(1000); //Add Title {edit value update from (Code)} EditTitle.Clear(); EditTitle.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "EditTitle")); //Thread.Sleep(1000); GlobalDefinitions.Wait(1000); //Add Description EditDescrp.Clear(); EditDescrp.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description")); //Thread.Sleep(1000); GlobalDefinitions.Wait(1000); //Service type OneOff.Click(); //Thread.Sleep(1000); GlobalDefinitions.Wait(1000); //Skill Trade EditCredit.Click(); CreditAmount.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CreditAmount")); //Thread.Sleep(1000); GlobalDefinitions.Wait(1000); Save.Click(); } else { Console.WriteLine("Test Fail, Edit un-successful"); } } catch (Exception ex) { throw; } }
public void FinalizeEdit() { URL = EditURL.Trim(); Title = EditTitle.Trim(); }
private void EhEditTitle_Click(object sender, RoutedEventArgs e) { EditTitle?.Invoke(); }