Exemplo n.º 1
0
        public double GetTotalPrice()
        {
            string totalPriceTitle   = shoppingCartPage.GetTotalPriceTitleText();
            string changedPriceTitle = "";

            foreach (char character in totalPriceTitle)
            {
                if (Char.IsDigit(character) || Char.IsPunctuation(character))
                {
                    changedPriceTitle += character;
                }
            }

            NumberFormatInfo format = new NumberFormatInfo();

            format.NumberDecimalSeparator = ".";

            return(Convert.ToDouble(changedPriceTitle, format));
        }