How do I clear the contents
This example demonstrates clearing the content in the input field.
In the solution shown below, the following actions are performed in HICC:
- The content in the "Age" input field is selected by passing "Keys.CONTROL,a" as value to the "sendKeys" command.
- The content in the "Age" input field is cleared by passing "Keys.BACK_SPACE" as value to the "sendKeys" command.
Solution:
# | Command | Target | Value |
---|---|---|---|
Selecting the content in the "Age" input field | |||
1 | sendKeys |
id=txt_age | Keys.CONTROL,a |
Clearing the content in the "Age" input field |
|||
2 | sendKeys |
id=txt_age |
Keys.BACK_SPACE |
Tips, Tricks, Gotchas & Best Practices:
- If "Keys.CONTROL,a" and "Keys.BACK_SPACE" actions doesn't work, as an alternative use clear command.