简体   繁体   English

findelements中的硒(java)findelements

[英]selenium (java) findelements in findelements

i want to find some elements of one class ("class1) out of many elements of class2. is there a possibility? 我想从class2的许多元素中找到一个类的某些元素(“ class1”)。有可能吗?

eg: findElements(By.className("class2")).findElements(By.className(class1)) ? 例如:findElements(By.className(“ class2”))。findElements(By.className(class1))吗?

Yes, but this would be a CSS selector: 是的,但这将是一个CSS选择器:

driver.FindElements(By.CssSelector("class2 > class1"));

By.className accepts a single class name, as identified by the method name. By.className接受由方法名称标识的单个类名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM