How to set text when the element is in read-only state
This example demonstrates how to enter/set value in a non-editable/readonly text field from the DOM using Javascript.
Solution:
# | Command | Target | Value |
---|---|---|---|
Set the value of the read-only text field | |||
1 | storeEval | window.document.getElementById("txt_FamilySize").value="2" | Var |
Tips, Tricks, Gotchas & Best Practices:
- As an alternate solution, you can use runScript command to achieve the same. To understand more about how to use runScript, click here.