Selenium's getAttribute() method works on particular web components. QAs must first locate the web components before calling the getAttribute() method and specifying the attributes for which values are needed.
size() is not a Web Element Method, according to the author.
WebDriver's findElements() command can be used to find multiple web elements and save them to a list. To add more value to the answer, we can use the findElement() command and save the results into a WebElement variable if the specified value has the ability to locate a single element.
Clear Explanation. Bahut acchi tarike se samjhaaya hein.. Thank u.