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

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.

主站蜘蛛池模板: 广汉市| 满洲里市| 渑池县| 鲜城| 北辰区| 那曲县| 江源县| 育儿| 资中县| 安阳县| 泗水县| 定安县| 巩义市| 富锦市| 乡宁县| 边坝县| 顺昌县| 白河县| 阿坝县| 扎鲁特旗| 留坝县| 南京市| 和政县| 哈巴河县| 河北区| 库伦旗| 钟祥市| 梧州市| 瑞安市| 项城市| 碌曲县| 东乌珠穆沁旗| 辛集市| 桦川县| 高安市| 靖州| 宿州市| 厦门市| 新郑市| 浦北县| 鹤峰县|