public void pushSalesOrder() { IArclitePage checklist = new ChecklistsPage(visitor, inputs); checklist.runTests(ArcliteTestAction.add); checklist.runTests(ArcliteTestAction.approve); visitor.switchToParentFrame(); Thread.Sleep(longSleepTime); IArclitePage addSalesOrder = new OrderTrackingAndManagementPage(visitor, inputs); addSalesOrder.runTests(ArcliteTestAction.add); visitor.switchToParentFrame(); Thread.Sleep(longSleepTime); //clicks the sales order IWebElement salesOrder = wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//a[@id='arc-scheduler-jobs']"))); salesOrder.Click(); Thread.Sleep(longSleepTime); //clicks the jobs to schedule IWebElement jobsToSchedule = wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//a[@id='jobs-to-schedule']"))); jobsToSchedule.Click(); //switch frame wait.Until(ExpectedConditions.FrameToBeAvailableAndSwitchToIt("mainFrame")); //search for customer IWebElement searchInput = wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//div[@id='tblJobsGrid_length']/input"))); searchInput.SendKeys("BCisaFB"); //div[@id='tblJobsGrid_length']/button[@id='btnSearch'] //clicks the search button IWebElement search = wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//div[@id='tblJobsGrid_length']/button[@id='btnSearch']"))); search.Click(); //clicks the check button IWebElement checkJobBox = wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//td[text()='BCisaFB']/parent::tr/td/div/label"))); checkJobBox.Click(); //clicks the gear button IWebElement schedule = wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//div[@id='tblJobsGrid_filter']/button[@id='btnSchedule']"))); schedule.Click(); }
public void deleteChecklist() { IArclitePage sales = new OrderTrackingAndManagementPage(visitor, inputs); sales.runTests(ArcliteTestAction.delete); visitor.switchToParentFrame(); Thread.Sleep(longSleepTime); IArclitePage checklist = new ChecklistsPage(visitor, inputs); checklist.runTests(ArcliteTestAction.delete); }