public void ChooseCountry(string country) { var countryDropDown = _pageObject.GetCountryDropDownElement(); Assert.IsNotNull(countryDropDown); countryDropDown.Click(); var chooseCountry = _pageObject.GetCountryElement(country); Assert.IsNotNull(chooseCountry); chooseCountry.Click(); var selectedCountry = _pageObject.GetSelectedCountryElement().Text; bool isRightCountry = (selectedCountry == country); Assert.True(isRightCountry); }