Selenium WebDriver – Locate Elements by Name

Getting elements using their tag names is often used to collect autosuggestions, checkboxes, ordered lists, and so on. The following line of code is an example of capturing elements trough the tagName function:

List link =  driver.findElement(By.locatorType("path")).findElements(By.tagName("li"));
Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: