public BoardPage MoveIssueFromToDoToInProgress() { DragAndDrop _drag = new DragAndDrop(); IWebElement ElementToBeMOved = wait.Until(driver => driver.FindElement(By.XPath("//div[contains(@class,'js-detailview ghx-issue js-issue ghx-has-avatar js-parent-drag')]"))); IWebElement InProgressColumn = wait.Until(driver => driver.FindElement(By.XPath("(//li[@class = 'ghx-column ui-sortable'])[2]"))); _drag.MoveAnElement(ElementToBeMOved, InProgressColumn, actions); return(this); }
public BoardPage MoveIssueFromInProgressToToDo() { bool staleElement = true; int attemps = 0; while (staleElement && attemps <= 20) { DragAndDrop _drag = new DragAndDrop(); try { IWebElement ElementToBeMOved = wait.Until(driver => driver.FindElement(By.XPath("//*[@role='listitem']"))); IWebElement DoneColumn = wait.Until(driver => driver.FindElement(By.XPath("(//li[@class = 'ghx-column ui-sortable'])[3]"))); _drag.MoveAnElement(ElementToBeMOved, DoneColumn, actions); staleElement = false; } catch (StaleElementReferenceException e) { staleElement = true; attemps++; } } return(this); }