- Selenium WebDriver 3 Practical Guide
- Unmesh Gundecha Satya Avasarala
- 186字
- 2021-08-13 16:08:09
Interacting with WebElements
In the previous section, we saw how to locate WebElements on a web page by using different locator methods. Here, we will see all the different user actions that can be performed on a WebElement. Different WebElements will have different actions that can be taken on them. For example, in a textbox element, we can type in some text or clear the text that is already typed in it. Similarly, for a button, we can click on it, get the dimensions of it, and so on, but we cannot type into a button, and for a link, we cannot type into it. So, though all the actions are listed in one WebElement interface, it is the test script developer's responsibility to use the actions that are supported by the target element. In case we try to execute the wrong action on a WebElement, we don't see any exception or error thrown and we don't see any action get executed; WebDriver ignores such actions silently.
Now, let's get into each of the actions individually by looking at their Javadocs and a code example.
- 物聯(lián)網(wǎng)工程規(guī)劃技術(shù)
- SOA用戶指南
- Twilio Cookbook
- JBoss EAP6 High Availability
- Building RESTful Web Services with Spring 5(Second Edition)
- 物聯(lián)網(wǎng)與智能家居
- 互聯(lián)網(wǎng)安全的40個(gè)智慧洞見(jiàn)(2016)
- Hands-On Docker for Microservices with Python
- NB-IoT原理和優(yōu)化
- Python API Development Fundamentals
- 世界互聯(lián)網(wǎng)發(fā)展報(bào)告2021
- Hands-On Reactive Programming in Spring 5
- Microsoft System Center 2012 Configuration Manager:Administration Cookbook
- 計(jì)算機(jī)網(wǎng)絡(luò)(項(xiàng)目教學(xué)版)
- Oracle ADF Faces Cookbook