这是我的示例代码:我正在从 SQL 中读取数据,对于每个记录,我需要访问网站并将数据输入到字段中,但它是一个字母一个字母地输入......就像打字一样
// 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);