/// <summary> /// go to the list of cars sold /// </summary> public ListOfCarsSoldPage GoToSoldCars() { Locators locators = new Locators(); IWebElement element = driver.FindElementByXPath(locators.CreateXPathForCarMark(car.Model)); element.Click(); return(new ListOfCarsSoldPage(driver, car)); }
/// <summary> /// go to the list of models page for the selected brand /// </summary> public ListOfModelsPage GoToModelsPage() { if (CheckExistenceOfTheMark(car.Mark)) { Locators locators = new Locators(); IWebElement element = driver.FindElementByXPath(locators.CreateXPathForCarMark(car.Mark)); ScrollWithOffset(element, 10, 10); element.Click(); return(new ListOfModelsPage(driver, car)); } else { throw new Exception("Chosen model is not available on the site"); } }