while(1){ try { driver.FindElement(By.XPath("")).SendKeys(aaaa.Text); break; } catch { Thread.Sleep(1000); } }