Reputation: 127
I tried to read the text from an input field of a Wicket App, but I failed. The expected text is displayed in the browser, but it is not displayed in the DOM when I open the developer tools in chrome and inspect this field.
The expected text "Profilname_1562052971" is displayed as you can see in the left column of the screenshot, but I can't see this in the DOM (center column). When I have a look at the properties (right column) of this input element, I see value: "Profilname_1562052971", which is what I expected. Why isn’t it displayed in the DOM?
Upvotes: 1
Views: 1000
Reputation: 5204
The truth is it probably is in the DOM you just see it as value name="data:name"
this comes from the form. The reason you don't see it in the DOM is that the value is inputted by the user and it is added to the attribute value
but this is not saved yet into the DOM! When you save this form it will be added.
To validate it with Selenium use element.get_attribute("value")
.
See jquery API.
Upvotes: 3