Reputation: 758
i want to find some elements of one class ("class1) out of many elements of class2. is there a possibility?
e.g.: findElements(By.className("class2")).findElements(By.className(class1)) ?
Upvotes: 1
Views: 266
Reputation: 25076
Yes, but this would be a CSS selector:
driver.FindElements(By.CssSelector("class2 > class1"));
By.className
accepts a single class name, as identified by the method name.
Upvotes: 1