- Selenium WebDriver 3 Practical Guide
- Unmesh Gundecha Satya Avasarala
- 107字
- 2021-08-13 16:08:06
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.
推薦閱讀
- 面向物聯(lián)網(wǎng)的嵌入式系統(tǒng)開發(fā):基于CC2530和STM32微處理器
- 面向云平臺的物聯(lián)網(wǎng)多源異構信息融合方法
- Getting Started with Grunt:The JavaScript Task Runner
- jQuery Mobile Web Development Essentials
- Learning Windows 8 Game Development
- Getting Started with nopCommerce
- 轉(zhuǎn)化:提升網(wǎng)站流量和轉(zhuǎn)化率的技巧
- Web用戶查詢?nèi)罩就诰蚺c應用
- 通信系統(tǒng)實戰(zhàn)筆記:無處不在的信號處理
- Building Microservices with Spring
- 走近2050:注意力、互聯(lián)網(wǎng)與人工智能
- 從實踐中學習Kali Linux網(wǎng)絡掃描
- 網(wǎng)絡攻防技術與實踐
- Alfresco Share
- 深入理解移動互聯(lián)網(wǎng)