driver.findElement()和driver.findElements()有什么区别? [英] What is the difference between driver.findElement() and driver.findElements()?
本文介绍了driver.findElement()和driver.findElements()有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在driver.findElements()
中,我们获得了另一个查找size()
的功能,该功能在driver.findElement()
中不可用.
这是唯一的区别吗?
In driver.findElements()
we get another function for finding size()
which is not available in driver.findElement()
.
Is it the only difference?
推荐答案
driver.findElement()
返回具有指定定位符的第一个匹配元素,而driver.findElements()
返回具有指定定位符的所有(组成)匹配元素.
driver.findElement()
returns first matching element with specified locator and driver.findElements()
returns all(array of) matching elements with specified locator.
这篇关于driver.findElement()和driver.findElements()有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文