Skip to content

Commit 4fa0af9

Browse files
DavertMikclaude
andcommitted
fix: use inputValue() for getProperty('value') in WebElement
For Playwright Locator objects, getProperty('value') should use inputValue() method instead of evaluate() to get the current value of input elements after fill() is called. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b05d90d commit 4fa0af9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/element/WebElement.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ class WebElement {
8282
async getProperty(name) {
8383
switch (this.helperType) {
8484
case 'playwright':
85+
// For Locator objects, use inputValue() for the 'value' property
86+
if (name === 'value' && this.element.inputValue) {
87+
return this.element.inputValue()
88+
}
8589
return this.element.evaluate((el, propName) => el[propName], name)
8690
case 'webdriver':
8791
return this.element.getProperty(name)

0 commit comments

Comments
 (0)