I have a problem when trying to find many elements in a page. Basically i have 20 identical pages, with slightly different data. Think 20 excel sheets. Page 1 50rows, page 2 100 rows, etc.. each row contains link and some data, and i want to find and make a list of all those links. So i go to page 1, get all links, move on to page 2, page 3, then when im at page which contains lots of rows, it (test) freezes, page stays open forever and there are no errors.
Im pretty sure problem is with FindElements() since this method i use to get links from each sheet/page and it works for ones with fewer elements:
List<IWebElement> _links = new List<IWebElement>();
List<string> links = new List<string>();
links = d.FindElements(By.PartialLinkText(partialLink)).ToList();
int i = 0;
foreach (IWebElement element in _links)
{
links.Add(_sellerLinks[i].Get_Attribute("href"));
i++;
}
It works flawlessly when there are 10-40 rows, sometimes fail at 70 rows, and can never get past 'sheet' with 400 rows. If there was problem with code it would fail sooner i think.
What is the limit to FindElements ? Could it fail/freeze and throw no errors ?