示例#1
0
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            SubjectElement subject = new SubjectElement(PageNames.CreatePassage);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.CreatePassage);

            GradeFromSelect               = gradeLevel.FromSelectElement;
            GradeToSelect                 = gradeLevel.ToSelectElement;
            TeacherInstructionEditor      = new TeacherInstructionEditor(PageNames.CreatePassage);
            Title_textbox                 = new WebElementWrapper(ByTitle_textbox);
            OptionalProperties_link       = new WebElementWrapper(ByOptionalProperties_link);
            OptionalProperties_icon       = new WebElementWrapper(ByOptionalProperties_icon);
            AdditionalPassageID_textbox   = new WebElementWrapper(ByAdditionalPassageID_textbox);
            AssetType_textbox             = new WebElementWrapper(ByAssetType_textbox);
            Author_textbox                = new WebElementWrapper(ByAuthor_textbox);
            CourseID_textbox              = new WebElementWrapper(ByCourseID_textbox);
            FleschKincaid_textbox         = new WebElementWrapper(ByFleschKincaid_textbox);
            Genre_textbox                 = new WebElementWrapper(ByGenre_textbox);
            QuestionLanguage_dropdown     = new SelectElementWrapper(new WebElementWrapper(ByQuestionLanguage_dropdown));
            LexileCode_dropdown           = new SelectElementWrapper(new WebElementWrapper(ByLexileCode_dropdown));
            Lexile_textbox                = new WebElementWrapper(ByLexile_textbox);
            BeginningReader_chkbox        = new WebElementWrapper(ByBeginningReader_chkbox);
            Publisher_textbox             = new WebElementWrapper(ByPublisher_textbox);
            ReadingMaturityMetric_textbox = new WebElementWrapper(ByReadingMaturityMetric_textbox);
            Topic_textbox                 = new WebElementWrapper(ByTopic_textbox);
            Type_dropdown                 = new SelectElementWrapper(new WebElementWrapper(ByType_dropdown));
            Year_textbox       = new WebElementWrapper(ByYear_textbox);
            Batch_textbox      = new WebElementWrapper(ByBatch_textbox);
            TeacherInstruction = new TeacherInstruction(PageNames.CreatePassage);
            Editor             = new Editor(PageNames.CreatePassage, this.ControlPrefix);
            PortraitLayout     = new WebElementWrapper(ByPortraitLayout);
            LandscapeLayout    = new WebElementWrapper(ByLandscapeLayout);
        }
示例#2
0
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            SubjectElement subject = new SubjectElement(PageNames.TestCentralHome);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.TestCentralHome);

            GradeFromSelect         = gradeLevel.FromSelectElement;
            GradeToSelect           = gradeLevel.ToSelectElement;
            TestNameId              = new WebElementWrapper(ByTestNameId);
            PrivateDraft            = new WebElementWrapper(ByPrivateDraft);
            Scheduled               = new WebElementWrapper(ByScheduled);
            PublicDraft             = new WebElementWrapper(ByPublicDraft);
            InProgress              = new WebElementWrapper(ByInProgress);
            Ready                   = new WebElementWrapper(ByReady);
            Completed               = new WebElementWrapper(ByCompleted);
            AdvancedBasicSearchLink = new WebElementWrapper(ByAdvancedBasicSearchLink);
            DataCollectionStatus    = new SelectElementWrapper(new WebElementWrapper(ByDataCollectionStatus));
            TestContent             = new WebElementWrapper(ByTestContent);
            TestCreatorFirstname    = new WebElementWrapper(ByTestCreatorFirstname);
            TestCreatorLastname     = new WebElementWrapper(ByTestCreatorLastname);
            StandardSet             = new SelectElementWrapper(new WebElementWrapper(ByStandardSet));
            Institution             = new WebElementWrapper(ByInstitution);
            TestCategory            = new SelectElementWrapper(new WebElementWrapper(ByTestCategory));
            AdaptiveTests           = new SelectElementWrapper(new WebElementWrapper(ByAdaptiveTests));
            Publisher               = new WebElementWrapper(ByPublisher);
            ExternalTestId          = new WebElementWrapper(ByExternalTestId);
            IncludePersonalTests    = new WebElementWrapper(ByIncludePersonalTests);
        }
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            TestPropertiesLink = new WebElementWrapper(ByTestPropertiesLink);
            EditPropertiesLink = new WebElementWrapper(ByEditPropertiesLink);
            //label fields
            UseEnableToolsManipulativesLabel = new WebElementWrapper(ByUseEnableToolsManipulativesLabel);
            //editable fields
            SubjectElement subject = new SubjectElement(PageNames.ViewTestDetailsTestProperties);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.ViewTestDetailsTestProperties);

            GradeFromSelect            = gradeLevel.FromSelectElement;
            GradeToSelect              = gradeLevel.ToSelectElement;
            InstitutionSource          = new WebElementWrapper(ByInstitutionSource);
            TestCategory               = new SelectElementWrapper(new WebElementWrapper(ByTestCategory));
            ScoreType                  = new SelectElementWrapper(new WebElementWrapper(ByScoreType));
            PreferredStandardsDocument = new SelectElementWrapper(new WebElementWrapper(ByPreferredStandardsDocument));
            DescriptionText            = new WebElementWrapper(ByDescriptionText);
            TestCreatorText            = new WebElementWrapper(ByTestCreatorText);
            EnableTextFormatting       = new EnableTextFormatting(PageNames.ViewTestDetailsTestProperties, this.ControlPrefix);
            AnswerChoiceLayout         = new AnswerChoiceLayout(PageNames.ViewTestDetailsTestProperties, this.ControlPrefix);
            EnableToolsManipulatives   = new EnableToolsManipulatives(PageNames.ViewTestDetailsTestProperties, this.ControlPrefix);
            StudentCommentEndOfTest    = new WebElementWrapper(ByStudentCommentEndOfTest);
            StudentCommentEachItem     = new WebElementWrapper(ByStudentCommentEachItem);
            TeacherCommentsYes         = new WebElementWrapper(ByTeacherCommentsYes);
            TeacherCommentsNo          = new WebElementWrapper(ByTeacherCommentsNo);
            StudentSelfAssessmentYes   = new WebElementWrapper(ByStudentSelfAssessmentYes);
            StudentSelfAssessmentNo    = new WebElementWrapper(ByStudentSelfAssessmentNo);
            HideItemContentYes         = new WebElementWrapper(ByHideItemContentYes);
            HideItemContentNo          = new WebElementWrapper(ByHideItemContentNo);
            CancelButton               = new WebElementWrapper(ByCancelButton);
            SubmitButton               = new WebElementWrapper(BySubmitButton);
        }
 /// <summary>
 /// get the Subject text
 /// </summary>
 /// <returns>text</returns>
 public string GetSubject()
 {
     SubjectElement.Wait(2);
     if (Driver.GetType() == typeof(DummyDriver))
     {
         SubjectElement.Text = FakeText;
     }
     return(SubjectElement.Text);
 }
    public bool GetItemElement(int itemLogicID, out SubjectElement itemElement)
    {
        itemElement = null;
        if (!_mItemElementList.TryGetValue(itemLogicID, out itemElement))
        {
            return(false);
        }

        return(true);
    }
        public override void InitElements()
        {
            TestCategoriesSelect = new SelectElementWrapper(new WebElementWrapper(ByTestCategoriesSelect));
            SubjectElement subject = new SubjectElement(PageNames.TeacherAssessDashboard);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.TeacherAssessDashboard);

            GradeFromSelect = gradeLevel.FromSelectElement;
            GradeToSelect   = gradeLevel.ToSelectElement;
        }
示例#7
0
        private MetaData GenerateMetaData()
        {
            CreatorElement creator = new CreatorElement();

            creator.Text = "Charles Petzold";

            IdentifierElement identifier = new IdentifierElement();

            identifier.Identifier = "urn:isbn:9780735656680";

            TitleElement title = new TitleElement();

            //title.Text = "Microsoft XNA Framework Edition: Programming Windows Phone 7";
            title.Text = doc.Name;

            RightsElement rights = new RightsElement();

            rights.Text = "Copyright © 2010";

            PublisherElement publisher = new PublisherElement();

            publisher.Text = "Microsoft Press";

            SubjectElement subject = new SubjectElement();

            subject.Text = "COMPUTERS / Programming / Microsoft Programming";

            DateElement date = new DateElement();

            date.Text = "2010-12-15";

            DescriptionElement description = new DescriptionElement();

            description.Text = "&lt;p&gt;Focusing on XNA and the C# language, you&amp;#8217;ll learn how to extend your existing skills to the Windows Phone 7 platform&amp;#8212;mastering the core tools and techniques for creating your own games for the phone.&lt;/p&gt;";

            LanguageElement language = new LanguageElement();

            language.Text = "en";

            MetaData meta = new MetaData()
            {
                Identifier  = identifier,
                Title       = title,
                Rights      = rights,
                Publisher   = publisher,
                Subject     = subject,
                Date        = date,
                Description = description,
                Creator     = creator,
                Language    = language
            };

            return(meta);
        }
示例#8
0
        /// <summary>
        /// intialize elements
        /// </summary>
        public override void InitElements()
        {
            TestCentralLink     = new WebElementWrapper(ByTestCentralLink);
            TestId              = new WebElementWrapper(ByTestId);
            RecentlyViewedTests = new SelectElementWrapper(new WebElementWrapper(ByRecentlyViewedTests));
            SubjectElement subject = new SubjectElement(PageNames.AssessDashboard);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.AssessDashboard);

            GradeFromSelect = gradeLevel.FromSelectElement;
            GradeToSelect   = gradeLevel.ToSelectElement;
        }
示例#9
0
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            //Subject = new Subject(PageNames.TestWindowViewTestWindow);
            //GradeLevel = new GradeLevel(PageNames.TestWindowViewTestWindow, this.ControlPrefix);
            SubjectElement subject = new SubjectElement(PageNames.TestWindowViewTestWindow);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.TestWindowViewTestWindow);

            GradeFromSelect = gradeLevel.FromSelectElement;
            GradeToSelect   = gradeLevel.ToSelectElement;
            TestWindowName  = new WebElementWrapper(ByTestWindowName);
            DateFrom        = new WebElementWrapper(ByDateFrom);
            DateTo          = new WebElementWrapper(ByDateTo);
            Grid            = new PlanHomeGrid(GridLocator);
        }
示例#10
0
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            //Subject = new Subject(PageNames.TestWindowCreateEditTestWindow);
            //GradeLevel = new GradeLevel(PageNames.TestWindowCreateEditTestWindow, this.ControlPrefix);
            SubjectElement subject = new SubjectElement(PageNames.TestWindowCreateEditTestWindow);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.TestWindowCreateEditTestWindow);

            GradeFromSelect = gradeLevel.FromSelectElement;
            GradeToSelect   = gradeLevel.ToSelectElement;
            TestWindowName  = new WebElementWrapper(ByTestWindowName);
            DateFrom        = new WebElementWrapper(ByDateFrom);
            DateTo          = new WebElementWrapper(ByDateTo);
            Description     = new WebElementWrapper(ByDescription);
        }
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            Report.Write("Martin CreateTestForm.InitElements");
            SubjectElement subject = new SubjectElement(PageNames.CreateTest);

            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.CreateTest);

            GradeFromSelect = gradeLevel.FromSelectElement;
            GradeToSelect   = gradeLevel.ToSelectElement;

            TestId = new TestId(PageNames.CreateTest, this.ControlPrefix);

            InstitutionSource          = new WebElementWrapper(ByInstitutionSource);
            TestCategory               = new SelectElementWrapper(new WebElementWrapper(ByTestCategory));
            UnansweredQuestions        = new SelectElementWrapper(new WebElementWrapper(ByUnansweredQuestions));
            ScoreType                  = new SelectElementWrapper(new WebElementWrapper(ByScoreType));
            TestFocusELA               = new WebElementWrapper(ByTestFocusELA);
            TestFocusReading           = new WebElementWrapper(ByTestFocusReading);
            TestFocusWriting           = new WebElementWrapper(ByTestFocusWriting);
            PreferredStandardsDocument = new SelectElementWrapper(new WebElementWrapper(ByPreferredStandardsDocument));
            AnswerKeyOnlyYes           = new WebElementWrapper(ByAnswerKeyOnlyYes);
            AnswerKeyOnlyNo            = new WebElementWrapper(ByAnswerKeyOnlyNo);

            EnableTextFormatting     = new EnableTextFormatting(PageNames.CreateTest, this.ControlPrefix);
            AnswerChoiceLayout       = new AnswerChoiceLayout(PageNames.CreateTest, this.ControlPrefix);
            EnableToolsManipulatives = new EnableToolsManipulatives(PageNames.CreateTest, this.ControlPrefix);

            StudentCommentEndOfTest  = new WebElementWrapper(ByStudentCommentEndOfTest);
            StudentCommentEachItem   = new WebElementWrapper(ByStudentCommentEachItem);
            TeacherCommentsYes       = new WebElementWrapper(ByTeacherCommentsYes);
            TeacherCommentsNo        = new WebElementWrapper(ByTeacherCommentsNo);
            StudentSelfAssessmentYes = new WebElementWrapper(ByStudentSelfAssessmentYes);
            StudentSelfAssessmentNo  = new WebElementWrapper(ByStudentSelfAssessmentNo);
            HideItemContentYes       = new WebElementWrapper(ByHideItemContentYes);
            HideItemContentNo        = new WebElementWrapper(ByHideItemContentNo);

            InitialItemSettingsLink        = new WebElementWrapper(ByInitialItemSettingsLink);
            InitialItemSettingsContainer   = new WebElementWrapper(ByInitialItemSettingsContainer);
            InitialItemSettingsExpandArrow = new WebElementWrapper(ByInitialItemSettingsExpandArrow);
            TestItemSettingsLink           = new WebElementWrapper(ByTestItemSettingsLink);
            TestItemSettingsContainer      = new WebElementWrapper(ByTestItemSettingsContainer);
            OptionalLink      = new WebElementWrapper(ByOptionalLink);
            OptionalContainer = new WebElementWrapper(ByOptionalContainer);
        }
        /// <summary>
        /// opens Subject in slider control and selects Subject as passed in the function
        /// </summary>
        public void AddSubject(String SubjectName)
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            waiter.Until(ExpectedConditions.ElementExists(MarksheetConstants.SelectSubjectButton));
            WebContext.WebDriver.FindElement(MarksheetConstants.SelectSubjectButton).Click();

            waiter.Until(ExpectedConditions.ElementExists(MarksheetConstants.SubjectList));
            ReadOnlyCollection <IWebElement> SubjectElements = WebContext.WebDriver.FindElements(MarksheetConstants.SubjectList);

            foreach (IWebElement SubjectElement in SubjectElements)
            {
                waiter.Until(ExpectedConditions.ElementToBeClickable(MarksheetConstants.SubjectList));

                if (SubjectElement.Text == SubjectName)
                {
                    SubjectElement.Click();
                    break;
                }
            }
        }
示例#13
0
        /// <summary>
        /// intialize elements
        /// </summary>
        public override void InitElements()
        {
            _currentWindow = Driver.CurrentWindowHandle;
            Report.Write("The current window is: '" + _currentWindow + "'.");
            switch (PageNames)
            {
            case PageNames.TestItemStandardPopup:
                //ctl00_MainContent_StandardsPicker_TableMain
                //ctl00_MainContent_StandardsPicker_ddlStandardDoc
                //ctl00_MainContent_StandardsPicker_DropDownGrade
                ControlMiddle = "StandardsPicker_";
                break;

            case PageNames.CreateNewItem:
                ControlMiddle = "StandardsPicker_";
                break;

            case PageNames.EditTestItem:
                ControlMiddle = "StandardsPicker_";
                break;

            case PageNames.EditTask:
                ControlMiddle = "StandardsPicker_";
                break;

            case PageNames.EditQuestion:
                ControlMiddle = "StandardsPicker_";
                break;

            case PageNames.ItemCentral:
                //ctl00_MainContent_ItemFinder1_ItemFinderSearch1_StandardsPicker1_TableMain
                //ctl00_MainContent_ItemFinder1_ItemFinderSearch1_StandardsPicker1_ddlStandardDoc
                //ctl00_MainContent_ItemFinder1_ItemFinderSearch1_StandardsPicker1_DropDownGrade
                ControlMiddle = "ItemFinder1_ItemFinderSearch1_StandardsPicker1_";
                break;

            case PageNames.CreateTestBySelectingStandardsPage:
                //ctl00_MainContent_StandardsPicker1_ddlStandardDoc
                //ctl00_MainContent_StandardsPicker1_DropDownSubject
                //ctl00_MainContent_StandardsPicker1_DropDownGrade
                ControlMiddle = "StandardsPicker1_";
                break;

            case PageNames.EditRubric:
                //ctl00_MainContent_StandardsPicker1_ddlStandardDoc
                //ctl00_MainContent_StandardsPicker1_DropDownSubject
                //ctl00_MainContent_StandardsPicker1_DropDownGrade
                ControlMiddle = "StandardsPicker_";
                break;
            }
            LightBox         = new WebElementWrapper(ByLightBox);
            IFrame           = new WebElementWrapper(ByIFrame);
            MainTable        = new WebElementWrapper(ByMainTable);
            MainDiv          = new WebElementWrapper(ByMainDiv);
            StandardDocument = new SelectElementWrapper(new WebElementWrapper(ByStandardDocument));
            if (PageNames == PageNames.CreateTestBySelectingStandardsPage)
            {
                //Subject = new Subject(Driver, PageNames.CreateTestBySelectingStandardsPage, ControlPrefix);
                SubjectElement subject = new SubjectElement(PageNames.CreateTestBySelectingStandardsPage);
                SubjectSelect = subject.SelectElement;
            }
            else
            {
                //Subject = new Subject(Driver, PageNames.TestItemStandardPopup, ControlPrefix);
                SubjectElement subject = new SubjectElement(PageNames.TestItemStandardPopup);
                SubjectSelect = subject.SelectElement;
            }
            GradeLevel              = new SelectElementWrapper(new WebElementWrapper(ByGradeLevel));
            FindStandardText        = new WebElementWrapper(ByFindStandardText);
            FindStandardButton      = new WebElementWrapper(ByFindStandardButton);
            ExpandAll               = new WebElementWrapper(ByExpandAll);
            CollapseAll             = new WebElementWrapper(ByCollapseAll);
            SelectedStandardsList   = new WebElementWrapper(BySelectedStandardsList);
            SelectedStandardsItems  = new WebElementWrapper(BySelectedStandardsItems);
            AvailableStandardsList  = new WebElementWrapper(ByAvailableStandardsList);
            AvailableStandardsItems = new WebElementWrapper(ByAvailableStandardsItems);
            NoStandardSelectedLabel = new WebElementWrapper(ByNoStandardSelectedLabel);
        }
        /// <summary>
        /// initialize elements
        /// </summary>
        public override void InitElements()
        {
            TestNameId = new WebElementWrapper(ByTestNameId);
            SubjectElement subject = new SubjectElement(PageNames.ViewPortalResults);
            SubjectSelect = subject.SelectElement;
            GradeLevelElement gradeLevel = new GradeLevelElement(PageNames.ViewPortalResults);
            GradeFromSelect = gradeLevel.FromSelectElement;
            GradeToSelect = gradeLevel.ToSelectElement;

            AdminDateRangeFrom = new WebElementWrapper(ByAdminDateRangeFrom);
            AdminDateRangeTo = new WebElementWrapper(ByAdminDateRangeTo);

            switch (GridName)
            {
                case ViewPortalResultsGridNames.MyTests:
                    if (isAdvancedSearchExpanded)
                    {
                        BasicSearchLink = new WebElementWrapper(ByBasicSearchLink);
                        DataCollectionStatus = new SelectElementWrapper(new WebElementWrapper(ByDataCollectionStatus));
                        TestContent = new WebElementWrapper(ByTestContent);
                        StandardSet = new SelectElementWrapper(new WebElementWrapper(ByStandardSet));
                        AdaptiveTests = new SelectElementWrapper(new WebElementWrapper(ByAdaptiveTests));
                    }
                    else
                    {
                        AdvancedSearchLink = new WebElementWrapper(ByAdvancedSearchLink);
                    }
                    break;
                case ViewPortalResultsGridNames.InProgressTests:
                    if (isAdvancedSearchExpanded)
                    {
                        BasicSearchLink = new WebElementWrapper(ByBasicSearchLink);
                        TestContent = new WebElementWrapper(ByTestContent);
                        TestCreatorFirstName = new WebElementWrapper(ByTestCreatorFirstName);
                        TestCreatorLastName = new WebElementWrapper(ByTestCreatorLastName);
                        StandardSet = new SelectElementWrapper(new WebElementWrapper(ByStandardSet));
                        AdaptiveTests = new SelectElementWrapper(new WebElementWrapper(ByAdaptiveTests));
                    }
                    else
                    {
                        AdvancedSearchLink = new WebElementWrapper(ByAdvancedSearchLink);
                        DataCollectionStatus = new SelectElementWrapper(new WebElementWrapper(ByDataCollectionStatus));
                    }
                    break;
                case ViewPortalResultsGridNames.ScheduledTests:
                    if (isAdvancedSearchExpanded)
                    {
                        BasicSearchLink = new WebElementWrapper(ByBasicSearchLink);
                        DataCollectionStatus = new SelectElementWrapper(new WebElementWrapper(ByDataCollectionStatus));
                        TestContent = new WebElementWrapper(ByTestContent);
                        TestCreatorFirstName = new WebElementWrapper(ByTestCreatorFirstName);
                        TestCreatorLastName = new WebElementWrapper(ByTestCreatorLastName);
                        StandardSet = new SelectElementWrapper(new WebElementWrapper(ByStandardSet));
                        AdaptiveTests = new SelectElementWrapper(new WebElementWrapper(ByAdaptiveTests));
                    }
                    else
                    {
                        AdvancedSearchLink = new WebElementWrapper(ByAdvancedSearchLink);
                    }
                    break;
                case ViewPortalResultsGridNames.RecommendedTests:
                    if (isAdvancedSearchExpanded)
                    {
                        BasicSearchLink = new WebElementWrapper(ByBasicSearchLink);
                        TestContent = new WebElementWrapper(ByTestContent);
                        TestCreatorFirstName = new WebElementWrapper(ByTestCreatorFirstName);
                        TestCreatorLastName = new WebElementWrapper(ByTestCreatorLastName);
                        StandardSet = new SelectElementWrapper(new WebElementWrapper(ByStandardSet));
                        TestCategory = new SelectElementWrapper(new WebElementWrapper(ByTestCategory));
                        AdaptiveTests = new SelectElementWrapper(new WebElementWrapper(ByAdaptiveTests));
                    }
                    else
                    {
                        AdvancedSearchLink = new WebElementWrapper(ByAdvancedSearchLink);
                        TestCategory = new SelectElementWrapper(new WebElementWrapper(ByTestCategory));
                    }
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
    private bool LoadItemElement(SecurityElement element, out SubjectElement itemElement)
    {
        itemElement = new SubjectElement();

        string attribute = element.Attribute("Subject_ID");

        if (attribute != null)
        {
            itemElement.SubjectID = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Term_ID");
        if (attribute != null)
        {
            itemElement.TermID = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Subject_Name");
        if (attribute != null)
        {
            itemElement.SubjectNameID = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Subject_Describe");
        if (attribute != null)
        {
            itemElement.SubjectTipsID = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Subject_Icon");
        if (attribute != null)
        {
            itemElement.SubjectIcon = attribute;
        }


        attribute = element.Attribute("Subject_Type");
        if (attribute != null)
        {
            itemElement.SubjectType = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Energy_Need");
        if (attribute != null)
        {
            itemElement.EnergyNeed = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Must_Select");
        if (attribute != null)
        {
            itemElement.MustSelect = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Total_Score");
        if (attribute != null)
        {
            itemElement.TotalScore = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("LiteratureGet");
        if (attribute != null)
        {
            itemElement.LiteratureGet = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("MathGet");
        if (attribute != null)
        {
            itemElement.MathGet = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("LanguageGet");
        if (attribute != null)
        {
            itemElement.LanguageGet = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("TechnologyGet");
        if (attribute != null)
        {
            itemElement.TechnologyGet = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("SportsGet");
        if (attribute != null)
        {
            itemElement.SportsGet = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("ArtGet");
        if (attribute != null)
        {
            itemElement.ArtGet = StrParser.ParseDecInt(attribute, -1);
        }

        attribute = element.Attribute("Reward_Exp");
        if (attribute != null)
        {
            itemElement.RewardExp = StrParser.ParseDecInt(attribute, -1);
        }


        itemElement.PropertyValueList.Add(itemElement.LiteratureGet);
        itemElement.PropertyValueList.Add(itemElement.MathGet);
        itemElement.PropertyValueList.Add(itemElement.LanguageGet);
        itemElement.PropertyValueList.Add(itemElement.TechnologyGet);
        itemElement.PropertyValueList.Add(itemElement.SportsGet);
        itemElement.PropertyValueList.Add(itemElement.ArtGet);

        return(true);
    }
 /// <summary>
 /// select the Subject link
 /// </summary>
 public void SelectSubject()
 {
     SubjectElement.Wait(3).Click();
 }