Get Input Values
locator.inputValue() returns the current value of <input>, <textarea>, or <select> elements. This differs from getAttribute('value') which returns the initial HTML attribute.
Task:
- Navigate to
https://testkru.com/Elements/TextFields - Read the pre-filled field value (ID:
preFilledTextField) usinginputValue() - Find the last name field (ID:
lastNameWithPlaceholder) - Fill it with "Automation" and read back the value using
inputValue()
Expected output:
Pre-filled: Codekru After fill: Automation
TestKru