Something like:
WebElement inputs = driver.findElement(By.tagName("input"));
or
List<WebElement> links = driver.findElementsBy(By.tagName("a"));
What i wanted was a name/value pair like structure which gives me tagName vs Quantity
My Objective is to have a list of these Elements and make a Series of tests associated with them, since different users would have their own unique set of these Elements per page.
I hope i got my message across.
You could do something like:
or
Then just sort the list as needed using getTagName or other functions.