Hi guys,
Iam new for C# and selenoum, pls help me.
This is the sample code, it working fine for me, i know its not a standard way of coding :-), but i dont knw whats the exact standard code for this.
But it will take huge time to execution, bcoz i have to extract 5000-10000 elements from each string, so is there fastest and standard code for this. Pls help me with coding, Thanks in advance, pls chk screenshot.
IList<IWebElement> ARNum = driver.FindElement(By.XPath("sumXpath1"));
IList<IWebElement> MPNum = driver.FindElement(By.XPath("sumXpath2"));
IList<IWebElement> MGNum = driver.FindElement(By.XPath("sumXpath3"));
int RowARNum=1;
foreach(IWebElement artNum in ARNum) //for First Column
{
RowARNum++;
XLWorkSheet.Cells(RowARNum, 1) = artNum.Text;
}
int RowMPNum =1;
foreach(IWebElement mpNum in MPNum) //for Second Column
{
RowMPNum++;
XLWorkSheet.Cells(RowMPNum, 1) = mpNum.Text;
}
int MGNum =1;
foreach(IWebElement mgNum in MGNum) //for Third Column
{
MGNum++;
XLWorkSheet.Cells(RowMPNum, 1) = mgNum.Text;
}