public void SelectMultipleJobs(IWebDriver driver, int rangeStart, int rangeEnd) { if (assigneeItemsList.Count != 0 && rangeEnd <= assigneeItemsList.Count && rangeStart <= assigneeItemsList.Count && rangeStart < rangeEnd) { var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); Actions selectingMultipleItems = new Actions(driver); assigneeItemsList.ElementAt(rangeStart).AssigneeItemElements[0].AssigneeJobClick(driver); selectingMultipleItems .KeyDown(Keys.Shift) .Click(driver.FindElement(By.ClassName("r_GH"))) .MoveToElement(driver.FindElement(By.XPath("(//*[@class=\"r_L\"])[last()]"))) .Build() .Perform(); assigneeItemsList.ElementAt(rangeEnd).AssigneeItemElements[assigneeItemsList.ElementAt(rangeEnd).AssigneeItemElements.Count - 1].AssigneeJobClick(driver); wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//*[@class='m1 lay_flt']"))); assigneeListMenu = new AssigneeListMenu(driver); /*if (assigneesJobsList.ElementAt(rangeStart).JobsButtonIsEnabled == 1 && assigneesJobsList.ElementAt(rangeEnd).JobsButtonIsEnabled == 1) * { * * }*/ } }
public void SelectAllJobs(IWebDriver driver) { if (assigneeItemsList.Count != 0) { var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); Actions selectingMultipleItems = new Actions(driver); IReadOnlyCollection <IWebElement> listofJobs = driver.FindElements(By.ClassName("r_L")); selectingMultipleItems .Click(listofJobs.ElementAt(0)) .KeyDown(Keys.Shift) .Click(driver.FindElement(By.ClassName("r_GH"))) .MoveToElement(listofJobs.ElementAt(listofJobs.Count - 1)) .Click(listofJobs.ElementAt(listofJobs.Count - 1)) .Build() .Perform(); //wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//*[@class='m1 lay_flt']"))); assigneeListMenu = new AssigneeListMenu(driver); /*if (assigneesJobsList.ElementAt(rangeStart).JobsButtonIsEnabled == 1 && assigneesJobsList.ElementAt(rangeEnd).JobsButtonIsEnabled == 1) * { * * }*/ } }
public void SelectJob(IWebDriver driver) { var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); IReadOnlyCollection <IWebElement> auxiliaryCollection; AssigneeJobClick(driver); wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//*[@class='m1 lay_flt']"))); assigneeListMenu = new AssigneeListMenu(driver); }
public void SelectSingleJob(IWebDriver driver, int jobNumber) { if (assigneeItemsList.Count != 0) { var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); IReadOnlyCollection <IWebElement> auxiliaryCollection; assigneeItemsList.ElementAt(jobNumber).AssigneeItemElements[0].AssigneeJobClick(driver); wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//*[@class='m1 lay_flt']"))); assigneeListMenu = new AssigneeListMenu(driver); } }