コード例 #1
0
        /// <summary>
        /// Creates accounts from the gathered account data.
        /// </summary>
        /// <returns>A list of accounts.</returns>
        /// <param name="accountData">Data scraped from the web repository.</param>
        public IList<TangerineAccount> BuildAccountList(IList<string> accountData)
        {
            List<TangerineAccount> accountList = new List<TangerineAccount>();

            for (var i = 0; i < accountData.Count; i += 2)
            {
                TangerineAccount account = new TangerineAccount()
                {
                    AccountIndex = (i) / 2,
                    Name = this.ParseName(accountData[i]),
                    Number = this.ParseNumber(accountData[i]),
                    Balance = this.ParseBalance(accountData[i + 1])
                };

                accountList.Add(account);
            }

            return accountList;
        }
コード例 #2
0
        /// <summary>
        /// Views the account detail.
        /// </summary>
        /// <param name="account">Account.</param>
        private void ClickViewAccountDetail(TangerineAccount account)
        {
            string accountLinkSelector = selectorMapping["viewAccountSummaryLink"]
                .Replace(
                     "account=",
                     string.Concat(
                         "account=",
                         account.AccountIndex));

            //            string href = this.client
            //                .GetElementAttributeValue(accountLinkSelector, "href");
            //
            //            this.client.OpenUrl(
            //                href,
            //                selectorMapping["viewAccountSummaryLink"]);

            this.client.ClickElementAndWaitForSelector(
                accountLinkSelector,
                selectorMapping["accountTransactionDetail"]);
        }