I'm trying to access the name of different products displayed on a website using selenium. For example on https://www.supremenewyork.com/shop/all/jackets i'm able to locate the products (webElements) and put them in a list but I can't get their name (as displayed under the image). Is there a way to do this using Selenium (in java)?
I have tried most of the methods in the WebElement Interface's API.
driver.get("https://www.supremenewyork.com/shop/all/");
ArrayList <WebElement> list = new ArrayList<>();
list.addAll(driver.findElements(By.className("inner-article")));
for (int i = 0; i < list.size(); i++) {
System.out.println(list.get(i).getTagName());
}
i would expect a console output displaying the names of all the product of the page However i get a list of the same string : "div".