/// <summary> /// the constructor /// </summary> /// <param name="webElement">IWebElement</param> /// <param name="itemid">the item ID</param> /// <param name="index">the index</param> /// <param name="uniqueId">the unique ID</param> public ItemCentralLineItem(IWebElement webElement, ItemCentralType itemCentralType, int itemid, int index, string uniqueId) : base() { Element = webElement; ItemCentralType = itemCentralType; ItemId = itemid; Index = index; UniqueId = uniqueId; switch (ItemCentralType) { case ItemCentralType.Item: idattribute = "itemid"; testidattribute = "test_item_id"; idValue = ItemId; break; case ItemCentralType.Passage: idattribute = "passageid"; testidattribute = "test_passage_id"; idValue = ItemId; break; case ItemCentralType.Rubric: idattribute = ""; testidattribute = "rubric_id"; idValue = ItemId; break; } InitElements(); }
/// <summary> /// Click on search after entering text in the ItemCentral page /// </summary> /// <returns>Workflows</returns> public ItemCentralWorkflows EnterSearchTextinItemCentral(string textToSearch, bool isPassage) { if (AssessWorkflows.ItemCentralHomePage == null) { throw new Exception("Navigate to the AssessWorkflows.ItemCentralHomePage before trying to use this workflow."); } //AND the user enter search text if (AssessWorkflows.ItemCentralHomePage.Data == null) { AssessWorkflows.ItemCentralHomePage.InitData(); } AssessWorkflows.ItemCentralHomePage.Data.SearchData = textToSearch; AssessWorkflows.ItemCentralHomePage.Form.InputFormFields(); //AND the user click submit to perform the search AssessWorkflows.ItemCentralHomePage.Form.SubmitForm(); if (isPassage) { ItemSearchType = ItemCentralType.Passage; } else { ItemSearchType = ItemCentralType.Item; } return(this); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> public ItemCentralSearchResultsPage(ItemCentralType itemCentralType) : base(itemCentralType) { this.Name = MethodBase.GetCurrentMethod().DeclaringType.Name; this.PrintName(); InitElements(); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> /// <param name="overrideControlPrefix">override control prefix</param> public ItemCentralSearchResultsForm(ItemCentralType itemCentralType, string overrideControlPrefix = null) : base(itemCentralType, overrideControlPrefix) { if (overrideControlPrefix != null) { this.ControlPrefix = overrideControlPrefix; } InitElements(); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> /// <param name="overrideControlPrefix">override control prefix</param> public ItemCentralForm(ItemCentralType itemCentralType, string overrideControlPrefix = null) : base() { this.ItemCentralType = itemCentralType; if (overrideControlPrefix != null) { this.ControlPrefix = overrideControlPrefix; } InitElements(); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> /// <param name="overrideControlPrefix">override control prefix</param> public ItemCentralStandardPickerForm(ItemCentralType itemCentralType, string overrideControlPrefix = null) : base() { if (overrideControlPrefix != null) { this.ControlPrefix = overrideControlPrefix; } this.ItemCentralType = itemCentralType; InitElements(); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> public ItemCentralStandardPickerPage(ItemCentralType itemCentralType) : base(itemCentralType) { this.Name = MethodBase.GetCurrentMethod().DeclaringType.Name; this.PrintName(); this.ExpectedUrl = "/Assess/ItemCentralHome.aspx"; this.VerifyCurrentUrl(); this.ItemCentralType = itemCentralType; InitElements(); }
/// <summary> /// Click on passage tab /// </summary> /// <returns>Workflows</returns> public ItemCentralWorkflows SelectPassageTab() { if (AssessWorkflows.ItemCentralHomePage == null) { throw new Exception("Navigate to the AssessWorkflows.ItemCentralHomePage before trying to use this workflow."); } //AND the user click on Passage Tab AssessWorkflows.ItemCentralHomePage.Detail.SelectPassagesTab(); ItemSearchType = ItemCentralType.Passage; return(this); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> public ItemCentralPage(ItemCentralType itemCentralType) : base() { this.Name = MethodBase.GetCurrentMethod().DeclaringType.Name; this.PrintName(); //Assess/ItemCentral.aspx //Assess/RubricCentral.aspx ExpectedUrl = new List <string>() { "ItemCentral.aspx", "RubricCentral.aspx" }; this.VerifyCurrentUrl(); this.ItemCentralType = itemCentralType; InitElements(); }
/// <summary> /// Enter search fields. By default, it search for item. /// </summary> /// <returns>Workflows</returns> public ItemCentralWorkflows ItemCentralHomePageInputAndSubmitForm() { if (AssessWorkflows.ItemCentralHomePage == null) { throw new Exception("Navigate to the AssessWorkflows.ItemCentralHomePage before trying to use this workflow."); } //AND the user enter search text AssessWorkflows.ItemCentralHomePage.Form.InputAndSubmitForm(); //Default to item search. If user select passage or rubric, need to add the code to //assigned ItemSearchType. if (ItemSearchType == null) { ItemSearchType = ItemCentralType.Item; } return(this); }
/// <summary> /// Click on rubric tab and search using text /// </summary> /// <returns>Workflows</returns> public ItemCentralWorkflows SelectRubricTabAndEnterSearchText(string textToSearch) { if (AssessWorkflows.ItemCentralHomePage == null) { throw new Exception("Navigate to the AssessWorkflows.ItemCentralHomePage before trying to use this workflow."); } //AND the user enter search text if (AssessWorkflows.ItemCentralHomePage.Data == null) { AssessWorkflows.ItemCentralHomePage.InitData(); } AssessWorkflows.ItemCentralHomePage.Data.SearchData = textToSearch; AssessWorkflows.ItemCentralHomePage.Form.InputFormFields(); //AND the user click on Rubric Tab AssessWorkflows.ItemCentralHomePage.Detail.SelectRubricsTab(); //AND the user click submit to perform the search AssessWorkflows.ItemCentralHomePage.Form.SubmitForm(); ItemSearchType = ItemCentralType.Rubric; return(this); }
/// <summary> /// the constructor /// </summary> /// <param name="itemCentralType">item central type</param> /// <param name="overrideControlPrefix">override control prefix</param> public ItemCentralSearchResultsDetail(ItemCentralType itemCentralType, string overrideControlPrefix = null) : base(itemCentralType, overrideControlPrefix) { InitElements(); }