I am working on some automation tests and have gotten to a wall. When the page is loaded, a call is made to get data to prefill input fields from what I can tell.
Here is the element that I'm checking(Goal is get the prefilled text from the input type="text" name="tempname"
to validate it is correct):
<div class="twelve columns">
<label for="tempname">Template Name <span class="compulsion"> *</span></label>
<input type="text" name="tempname" id="tempname">
<h4 class="notice fielderror"></h4>
</div>
Typically in my Selenium test, I would return the element and use getAttribute()
or getText()
to return what I'm looking for and use an assertTrue
or assertEquals
.
I can't figure out how to get the text that is displayed within this element to validate it. Any ideas/tips would be really helpful!
Side note: I am using Selenium for my automation tests