public string FirstGetDate(string day) { string month = GetMonth(First.FindElement(By.XPath(".//span[contains(@class, 'ui-datepicker-month')]")).Text); string year = First.FindElement(By.XPath(".//span[contains(@class, 'ui-datepicker-year')]")).Text; return(year + month + day); }