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

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.

主站蜘蛛池模板: 思南县| 渭源县| 荣成市| 桦川县| 凤阳县| 巴塘县| 宣恩县| 寿宁县| 黄浦区| 天津市| 紫阳县| 贡觉县| 莱芜市| 乐至县| 全椒县| 女性| 湄潭县| 广德县| 疏勒县| 天长市| 利川市| 仲巴县| 孟津县| 临沭县| 理塘县| 比如县| 石河子市| 宜章县| 辽源市| 蒙阴县| 临朐县| 西充县| 阜新| 开原市| 濮阳县| 湖州市| 安丘市| 虹口区| 芦山县| 开化县| 大兴区|