public void ShouldSeePrice(int startPrice, int endPrice) { var carPrices = _driver.FindElements(By.XPath(".//div[@class='content']//span[@class='bold green size22'][1]")); foreach (var item in carPrices) { int actualPrice = Int32.Parse(WebDriverExtensions.RemoveWhitespace(item.Text)); Assert.GreaterOrEqual(actualPrice, startPrice, "Start price that set up on search page doesn't according to price on the list of cars"); Assert.LessOrEqual(actualPrice, endPrice, "End price that set up on search page doesn't according to price on the list of cars"); } }