Exemplo n.º 1
0
        /// <summary>
        /// Get the weather information
        /// </summary>
        /// <param name="city"></param>
        /// <returns></returns>
        public WeatherDetails GetWeatherInfo(string city)
        {
            WeatherDetails weatherDetails = new WeatherDetails();

            weatherPage.PinCity(city).Click();
            weatherDetails.humidity      = Convert.ToDouble((String.Join("", weatherPage.WeatherDetails("Humidity").GetAttribute("innerText").Where(char.IsDigit))));
            weatherDetails.TempInDegrees = Convert.ToDouble((String.Join("", weatherPage.WeatherDetails("Temp in Degrees").GetAttribute("innerText").Where(char.IsDigit))));
            return(weatherDetails);
        }