I am trying to find an element with Attribute. Well, I can find elements with Id, tagName, Xpath and all other predefined methods in Selenium. But, I am trying to write a me
I do not understand your requirement:
Assuming XPath is not an option ...
If this was just an incorrect assumption on your part, then XPath is the perfect option!
webDriver.findElements(By.xpath("//element[@attribute='value']"))
Of course you need to replace element, attribute, and value with your actual names. You can also find "any element" by using the wildcard:
webDriver.findElements(By.xpath("//*[@attribute='value']"))