これが私のサンプルコードです:私はSQLから読んでおり、各レコードについてWebサイトにアクセスしてフィールドにデータを入力する必要がありますが、入力するようにアルファベットごとに1つのアルファベットを入力しています。
// Declare variables
string tempaccount = "";
string tempcounter = "";
tempaccount = myReader2["acctno"].ToString();
tempcounter = myReader2["counter"].ToString();
string recipient_last_name = myReader2["last"].ToString();
string recipient_first_name = myReader2["first"].ToString();
//---------------------------------------------------------------------
//------------------------ Data Entry ---------------------------------
//---------------------------------------------------------------------
IWebElement tPATIENT_LAST_NAME = driver.FindElement(By.Name("LAST_NAME"));
tPATIENT_LAST_NAME.SendKeys(recipient_last_name);
IWebElement FIRST_NAME = driver.FindElement(By.Name("tPATIENT_FIRST_NAME"));
tPATIENT_FIRST_NAME.SendKeys(recipient_first_name);