public void CelsiusToFahrenheit() { var result = new ApiFactory() .ChangeContext <ICelsiusToFahrenheit>() .ClickOnTemperatureConvector() .ClickOnCelsius() .ClickOnCelsiusToFahrenheit() .TypeToCelsiusTextBox(numberToConvert) .ChangeFormatToDecimal() .GetConvertionValue(); var actual = result.GetResaultNum(); var num = ConversionRaitasCalcluation.CelsiusToFahrenheit(numberToConvert); var expected = Math.Abs(actual - num); Assert.IsTrue(expected < 1); }