diff --git a/src/Codeception/Lib/InnerBrowser.php b/src/Codeception/Lib/InnerBrowser.php
index dc11858..22dd243 100644
--- a/src/Codeception/Lib/InnerBrowser.php
+++ b/src/Codeception/Lib/InnerBrowser.php
@@ -802,7 +802,7 @@ protected function getValueAndTextFromField(Crawler $nodes): array|string
return $values;
}
- $this->fail("Element {$nodes} is not a form field or does not contain a form field");
+ $this->fail("Element {$nodes->getNode(0)?->getNodePath()} is not a form field or does not contain a form field");
}
/**
@@ -1539,7 +1539,7 @@ public function grabValueFrom($field): mixed
return $values;
}
- $this->fail("Element {$nodes} is not a form field or does not contain a form field");
+ $this->fail("Element {$nodes->getNode(0)?->getNodePath()} is not a form field or does not contain a form field");
}
public function setCookie($name, $val, $params = [])
diff --git a/tests/data/app/view/form/field_values.php b/tests/data/app/view/form/field_values.php
index 8c99c29..df89ba3 100644
--- a/tests/data/app/view/form/field_values.php
+++ b/tests/data/app/view/form/field_values.php
@@ -54,5 +54,6 @@
+