/* Constructors */ public JobsListMenu(IWebDriver driver) : base(driver) { IReadOnlyCollection <IWebElement> auxiliaryCollection; this.driver = driver; wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); auxiliaryCollection = driver.FindElements(By.XPath("//*[@class='m1 lay_flt']")); if (auxiliaryCollection.Count != 1) { throw new Exception(String.Format("Menu panel was not found on the page or multiple were found.")); } menuPanel = auxiliaryCollection.ElementAt(0); menuOptions = menuPanel.FindElements(By.TagName("li")); tagJobButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_tag\")]", wait); editButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_edt\")]", wait); hideButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_shj\")]", wait); createCopyButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_null\") and contains(text(),\"a copy\")]", wait); createRelatedJobButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_null\") and contains(text(),\"related job\")]", wait); cancelButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_ccl\")]", wait); showSourceButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_shw\") and contains(text(),\"Source Files\")]", wait); showWordCountButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_shw\") and contains(text(),\"Word Counts\")]", wait); showDeliveryButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_shw\") and contains(text(),\"Delivery\")]", wait); showHistoryButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_fld\")]", wait); showAuditLogsButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_null\") and contains(text(),\"Audit Logs\")]", wait); copyToClipboardButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_null\") and contains(text(),\"to Clipboard\")]", wait); }
/* Constructors */ public JobsListMenu(IWebDriver driver) : base(driver) { IReadOnlyCollection <IWebElement> auxiliaryCollection; this.driver = driver; auxiliaryCollection = driver.FindElements(By.XPath("//*[@class='m1 lay_flt']")); if (auxiliaryCollection.Count != 1) { throw new Exception(String.Format("Menu panel was not found on the page or multiple were found.")); } menuPanel = auxiliaryCollection.ElementAt(0); menuOptions = menuPanel.FindElements(By.TagName("li")); tagJobButton = new ListMenuButton(menuOptions, driver, "mnu_tag"); editButton = new ListMenuButton(menuOptions, driver, "mnu_edt"); hideButton = new ListMenuButton(menuOptions, driver, "mnu_shj"); createCopyButton = new ListMenuButton(menuOptions, driver, "mnu_cpy"); createRelatedJobButton = new ListMenuButton(menuOptions, driver, "mnu_null"); cancelButton = new ListMenuButton(menuOptions, driver, "mnu_ccl"); showSourceButton = new ListMenuButton(menuOptions, driver, "mnu_shw", "Source Files"); showWordCountButton = new ListMenuButton(menuOptions, driver, "mnu_tag", "Word Counts"); showHistoryButton = new ListMenuButton(menuOptions, driver, "mnu_fld"); showAuditLogsButton = new ListMenuButton(menuOptions, driver, "mnu_tag", "Audit Logs"); copyToClipboardButton = new ListMenuButton(menuOptions, driver, "mnu_cpy"); }
/* Constructors */ public AssigneeListMenu(IWebDriver driver) : base(driver) { IReadOnlyCollection <IWebElement> auxiliaryCollection; auxiliaryCollection = driver.FindElements(By.XPath("//*[@class='m1 lay_flt']")); if (auxiliaryCollection.Count != 1) { throw new Exception(String.Format("Menu panel was not found on the page or multiple were found.")); } menuPanel = auxiliaryCollection.ElementAt(0); menuOptions = menuPanel.FindElements(By.TagName("li")); tagJobButton = new ListMenuButton(menuOptions, driver, "mnu_tag"); markAsCompleteButton = new ListMenuButton(menuOptions, driver, "mnu_acp"); markAsPassedButton = new ListMenuButton(menuOptions, driver, "mnu_pas"); markAsFailedButton = new ListMenuButton(menuOptions, driver, "mnu_del"); unclaimButton = new ListMenuButton(menuOptions, driver, "mnu_unc"); copyToClipboardButton = new ListMenuButton(menuOptions, driver, "mnu_cpy"); }
/* Constructors */ public AssigneeListMenu(IWebDriver driver) : base(driver) { IReadOnlyCollection <IWebElement> auxiliaryCollection; wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); auxiliaryCollection = driver.FindElements(By.XPath("//*[@class='m1 lay_flt']")); if (auxiliaryCollection.Count != 1) { throw new Exception(String.Format("Menu panel was not found on the page or multiple were found.")); } menuPanel = auxiliaryCollection.ElementAt(0); menuOptions = menuPanel.FindElements(By.TagName("li")); tagJobButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_tag\")]", wait); markAsCompleteButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_acp\")]", wait); markAsPassedButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_pas\")]", wait); markAsFailedButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_del\")]", wait); unclaimButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_unc\")]", wait); copyToClipboardButton = new ListMenuButton(menuPanel, ".//li[contains(@class,\"mnu_cpy\")]", wait); }