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

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.

主站蜘蛛池模板: 策勒县| 洪洞县| 都匀市| 化隆| 楚雄市| 阳信县| 昌平区| 乡城县| 龙泉市| 庆城县| 福建省| 石棉县| 化德县| 景宁| 长汀县| 奉节县| 青田县| 内江市| 巍山| 肇东市| 江津市| 沐川县| 绵阳市| 成都市| 内江市| 兴业县| 开化县| 东安县| 五台县| 镇江市| 五常市| 栾城县| 怀安县| 庆元县| 合作市| 新和县| 丰都县| 泰和县| 阿城市| 油尖旺区| 积石山|