官术网_书友最值得收藏!

The findElements method

For finding multiple elements matching the same locator criteria on a web page, the findElements() method can be used. It returns a list of WebElements found for a given locating mechanism. The method declaration of the findElements() method is as follows:

java.util.List findElements(By by)

The input parameter is the same as the findElement() method, which is an instance of the By class. The difference lies in the return type. Here, if no element is found, an empty list is returned and if there are multiple WebElements present that satisfy the locating mechanism, all of them are returned to the caller in a list.

主站蜘蛛池模板: 漠河县| 青州市| 分宜县| 临清市| 泽库县| 呼玛县| 沾益县| 响水县| 桃源县| 元阳县| 太湖县| 新化县| 尉犁县| 外汇| 昌黎县| 涞源县| 景宁| 黄龙县| 合水县| 师宗县| 霍林郭勒市| 乐陵市| 康定县| 烟台市| 信阳市| 盘山县| 教育| 天全县| 浦城县| 分宜县| 垣曲县| 小金县| 武川县| 易门县| 大洼县| 阿荣旗| 东平县| 中卫市| 通化市| 河南省| 石嘴山市|