1

I want to obtain the 'text' attribute of all the objects in a IWebElement list, when I create a loop to go throught that list extracting the text of each element, I obtain the text of a few.

    var synonymList = new List<string>(); 

    if (defInfo.FindElement(By.ClassName("gt-def-synonym")) != null)
       {
         var synonyms = defInfo.FindElements(By.ClassName("gt-cd-cl"));

         foreach (var syn in synonyms)
         {
           synonymList.Add(syn.Text);
         }
       }
Handresito
  • 11
  • 5

0 Answers0