コード例 #1
0
        public List <Document> ReadDocumentGrid()
        {
            List <string>   DocData   = null;
            List <Document> documents = new List <Document>();
            int             row       = elementUtils.CountTableRows(ClaimantDetailsPage.DocumentGridRow);

            for (int i = 2; i <= row; i++)
            {
                DocData = new List <string>();
                DocData = elementUtils.ReadTableRowData(DocData, ClaimantDetailsPage.DocumentGridCol, ClaimantDetailsPage.GetTableXPathRowForDoc(i), ClaimantDetailsPage.DThirdPart);
                documents.Add(new Document()
                {
                    DocId = DocData[0], DocType = DocData[1], FileName = DocData[2], Comments = DocData[3], BGReceivedDate = DocData[4], PostMarkDate = DocData[5], DateUploaded = DocData[6], UploadedBy = DocData[7]
                });
            }
            return(documents);
        }
コード例 #2
0
        public List <Events> ReadEventGrid()
        {
            List <string> EventData = null;
            List <Events> events    = new List <Events>();
            int           row       = 0;

            if (elementUtils.CheckElementExists(ClaimantDetailsPage.EventShowAll))
            {
                elementUtils.SetStaleElementWait(ClaimantDetailsPage.EventShowAll);
                elementUtils.ClickElement(ClaimantDetailsPage.EventShowAll);
                row = elementUtils.CountTableRows(ClaimantDetailsPage.EventDetailGridRow);
                for (int i = 2; i <= row; i++)
                {
                    EventData = new List <string>();
                    EventData = elementUtils.ReadTableRowData(EventData, ClaimantDetailsPage.EventDetailGridCol, ClaimantDetailsPage.GetTableXPathRowForEventDetails(i), ClaimantDetailsPage.EThirdPart);
                    events.Add(new Events()
                    {
                        EventDesc = EventData[3], EventDate = DateTime.Parse(EventData[4])
                    });
                }
                elementUtils.ClickElement(ClaimantDetailsPage.EventGridClose);
                return(events);
            }
            else
            {
                row = elementUtils.CountTableRows(ClaimantDetailsPage.EventGridRow);
                for (int i = 2; i < row; i++)
                {
                    EventData = new List <string>();
                    EventData = elementUtils.ReadTableRowData(EventData, ClaimantDetailsPage.EventGridCol, ClaimantDetailsPage.GetTableXPathColumnForEvent(i), ClaimantDetailsPage.EThirdPart);
                    events.Add(new Events()
                    {
                        EventDesc = EventData[3], EventDate = DateTime.Parse(EventData[4]), Comments = EventData[5]
                    });
                }
                return(events);
            }
        }