1

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)) ?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.